This commit is contained in:
Arne Döring
2018-11-08 13:14:06 +01:00
committed by Andreas Rumpf
parent cba86a9893
commit a147166710

View File

@@ -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}: