* 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
|
|
@ -476,7 +476,7 @@ proc inferWithMetatype(c: PContext, formal: PType,
|
|||
result.typ = generateTypeInstance(c, m.bindings, arg.info,
|
||||
formal.skipTypes({tyCompositeTypeClass}))
|
||||
else:
|
||||
typeMismatch(c.config, arg.info, formal, arg.typ)
|
||||
typeMismatch(c.config, arg.info, formal, arg.typ, arg)
|
||||
# error correction:
|
||||
result = copyTree(arg)
|
||||
result.typ = formal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue