* 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
|
|
@ -127,9 +127,10 @@ proc semForFields(c: PContext, n: PNode, m: TMagic): PNode =
|
|||
localError(c.config, n.info, errGenerated, "no object or tuple type")
|
||||
return result
|
||||
for i in 1..<call.len:
|
||||
var tupleTypeB = skipTypes(call[i].typ, skippedTypesForFields)
|
||||
let calli = call[i]
|
||||
var tupleTypeB = skipTypes(calli.typ, skippedTypesForFields)
|
||||
if not sameType(tupleTypeA, tupleTypeB):
|
||||
typeMismatch(c.config, call[i].info, tupleTypeA, tupleTypeB)
|
||||
typeMismatch(c.config, calli.info, tupleTypeA, tupleTypeB, calli)
|
||||
|
||||
inc(c.p.nestedLoopCounter)
|
||||
if tupleTypeA.kind == tyTuple:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue