fix #13182: proc fun(a: varargs[Foo, conv]) now can be overloaded (#13345) [backport]

This commit is contained in:
Timothee Cour 2020-02-07 04:29:18 -08:00 • committed by GitHub
commit 79ec8c2571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 1 deletions

View file

@ -1938,7 +1938,8 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
var call = newNodeI(nkCall, arg.info)
call.add(f.n.copyTree)
call.add(arg.copyTree)
result = c.semExpr(c, call)
result = c.semTryExpr(c, call)
if result != nil:
if result.typ == nil: return nil
# resulting type must be consistent with the other arguments: