Improved support for nkSymChoices in type coercions
For example, this allows you to pick up a proc with a specific signature from an overload set. bugfix: nimrod generated invalid code when a RVO function had a single compile-time param bugfix: nkHiddenDerefs were not neutralised properly for indirect proc calls
This commit is contained in:
parent
7424a60ba1
commit
3c9e3a6a71
5 changed files with 147 additions and 51 deletions
|
|
@ -685,8 +685,8 @@ proc ParamTypesMatchAux(c: PContext, m: var TCandidate, f, a: PType,
|
|||
result = userConvMatch(c, m, base(f), a, arg)
|
||||
|
||||
proc ParamTypesMatch(c: PContext, m: var TCandidate, f, a: PType,
|
||||
arg, argOrig: PNode): PNode =
|
||||
if arg == nil or arg.kind != nkClosedSymChoice:
|
||||
arg, argOrig: PNode): PNode =
|
||||
if arg == nil or arg.kind notin nkSymChoices:
|
||||
result = ParamTypesMatchAux(c, m, f, a, arg, argOrig)
|
||||
else:
|
||||
# CAUTION: The order depends on the used hashing scheme. Thus it is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue