From 5018f6fa15f60ddf26bc7ca347a38c29899aa3b3 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 19 Apr 2017 15:20:46 +0200 Subject: fixes #5729 --- compiler/sempass2.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/sempass2.nim') diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index ce7474966..96bdc6cba 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -517,7 +517,7 @@ proc propagateEffects(tracked: PEffects, n: PNode, s: PSym) = proc procVarcheck(n: PNode) = if n.kind in nkSymChoices: for x in n: procVarCheck(x) - elif n.kind == nkSym and n.sym.magic != mNone: + elif n.kind == nkSym and n.sym.magic != mNone and n.sym.kind in routineKinds: localError(n.info, errXCannotBePassedToProcVar, n.sym.name.s) proc notNilCheck(tracked: PEffects, n: PNode, paramType: PType) = -- cgit 1.4.1-2-gfad0