From a147166710ca30adc2d10b4de26348384fbcec40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Thu, 8 Nov 2018 13:14:06 +0100 Subject: [PATCH] fix #8335 --- compiler/semexprs.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 10ae49b12d..504a548134 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1538,6 +1538,8 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode = # a = b # both are vars, means: a[] = b[] # a = b # b no 'var T' means: a = addr(b) var le = a.typ + if le == nil: + localError(c.config, a.info, "expression has no type") if (skipTypes(le, {tyGenericInst, tyAlias, tySink}).kind != tyVar and isAssignable(c, a) == arNone) or skipTypes(le, abstractVar).kind in {tyOpenArray, tyVarargs}: