improve confusing error messages for failed overloading resolution when deref of first arg failed
This commit is contained in:
parent
eb83ec2685
commit
68d606d773
1 changed files with 7 additions and 1 deletions
|
|
@ -408,7 +408,13 @@ proc semOverloadedCall(c: PContext, n, nOrig: PNode,
|
||||||
else:
|
else:
|
||||||
# get rid of the deref again for a better error message:
|
# get rid of the deref again for a better error message:
|
||||||
n.sons[1] = n.sons[1].sons[0]
|
n.sons[1] = n.sons[1].sons[0]
|
||||||
notFoundError(c, n, errors)
|
#notFoundError(c, n, errors)
|
||||||
|
if efExplain notin flags:
|
||||||
|
# repeat the overload resolution,
|
||||||
|
# this time enabling all the diagnostic output (this should fail again)
|
||||||
|
discard semOverloadedCall(c, n, nOrig, filter, flags + {efExplain})
|
||||||
|
else:
|
||||||
|
notFoundError(c, n, errors)
|
||||||
else:
|
else:
|
||||||
if efExplain notin flags:
|
if efExplain notin flags:
|
||||||
# repeat the overload resolution,
|
# repeat the overload resolution,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue