From 440d100595129e9e5956fe87e595eaeb08006398 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 8 Jul 2017 23:32:40 +0200 Subject: [PATCH] fixes #6067 --- compiler/sempass2.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index c383f352fa..e24c5fd295 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -69,7 +69,8 @@ proc `==`(a, b: TLockLevel): bool {.borrow.} proc max(a, b: TLockLevel): TLockLevel {.borrow.} proc isLocalVar(a: PEffects, s: PSym): bool = - s.kind in {skVar, skResult} and sfGlobal notin s.flags and s.owner == a.owner + s.kind in {skVar, skResult} and sfGlobal notin s.flags and + s.owner == a.owner and s.typ != nil proc getLockLevel(t: PType): TLockLevel = var t = t