diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index 4f3c50dae6..3df1e0c3f7 100644 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -391,16 +391,24 @@ proc semGenericStmt(c: PContext, n: PNode, a[^1] = semGenericStmtScope(c, a[^1], flags, ctx) closeScope(c) - of nkVarSection, nkLetSection: + of nkVarSection, nkLetSection, nkConstSection: + let varKind = + case n.kind + of nkVarSection: skVar + of nkLetSection: skLet + else: skConst for i in 0..