From 7bdcaada130e27c8ee24a3feb12e55705b18f41d Mon Sep 17 00:00:00 2001 From: narimiran Date: Mon, 24 Jun 2024 10:58:14 +0200 Subject: [PATCH] don't use unknown proc --- compiler/seminst.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/seminst.nim b/compiler/seminst.nim index 327c9e63e3..f779d38006 100644 --- a/compiler/seminst.nim +++ b/compiler/seminst.nim @@ -62,8 +62,8 @@ iterator instantiateGenericParamList(c: PContext, n: PNode, pt: TIdTable): PSym t = errorType(c) elif isUnresolvedStatic(t) and (q.typ.kind == tyStatic or (q.typ.kind == tyGenericParam and - q.typ.genericParamHasConstraints and - q.typ.genericConstraint.kind == tyStatic)) and + q.typ.sons.len > 0 and + q.typ.sons[0].kind == tyStatic)) and c.inGenericContext == 0 and c.matchedConcept == nil: # generic/concept type bodies will try to instantiate static values but # won't actually use them