diff options
Diffstat (limited to 'compiler/semstmts.nim')
-rwxr-xr-x | compiler/semstmts.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 0317db849..64b0f5339 100755 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -269,7 +269,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode = if def != nil and def.kind != nkEmpty: # this is only needed for the evaluation pass: v.ast = def - if a.kind != nkVarTuple: + if sfThread in v.flags: LocalError(def.info, errThreadvarCannotInit) + if a.kind != nkVarTuple: v.typ = typ b = newNodeI(nkIdentDefs, a.info) addSon(b, newSymNode(v)) |