feedback injected
This commit is contained in:
parent
ff950725fa
commit
b306e0bfe2
3 changed files with 3 additions and 4 deletions
|
|
@ -1540,7 +1540,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode =
|
|||
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
|
||||
elif (skipTypes(le, {tyGenericInst, tyAlias, tySink}).kind != tyVar and
|
||||
isAssignable(c, a) == arNone) or
|
||||
skipTypes(le, abstractVar).kind in {tyOpenArray, tyVarargs}:
|
||||
# Direct assignment to a discriminant is allowed!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue