diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-11-08 13:14:06 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-11-08 22:28:29 +0100 |
commit | a147166710ca30adc2d10b4de26348384fbcec40 (patch) | |
tree | 4d7f57dea51edc749a28aad506a439129d4e17e6 | |
parent | cba86a9893022c3a4646eae711a5be2c2f0ea66f (diff) | |
download | Nim-a147166710ca30adc2d10b4de26348384fbcec40.tar.gz |
fix #8335
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 10ae49b12..504a54813 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}: |