mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-29 10:01:39 +00:00
* fix #16150 improve type mismatch errors * allow -d:nimLegacyTypeMismatch * address comment
This commit is contained in:
@@ -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]))
|
||||
|
||||
Reference in New Issue
Block a user