* fix #16150 improve type mismatch errors * allow -d:nimLegacyTypeMismatch * address comment
This commit is contained in:
parent
87e634aab3
commit
f344a70412
7 changed files with 14 additions and 7 deletions
|
|
@ -1745,7 +1745,7 @@ proc semAsgn(c: PContext, n: PNode; mode=asgnNormal): PNode =
|
|||
c.p.resultSym.typ = rhsTyp
|
||||
c.p.owner.typ[0] = rhsTyp
|
||||
else:
|
||||
typeMismatch(c.config, n.info, lhs.typ, rhsTyp)
|
||||
typeMismatch(c.config, n.info, lhs.typ, rhsTyp, rhs)
|
||||
borrowCheck(c, n, lhs, rhs)
|
||||
|
||||
n[1] = fitNode(c, le, rhs, goodLineInfo(n[1]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue