fix dispatcher call type [backport] (#20696)
fix dispatcher call type The call node should have the type of the dispatcher, not the static call
This commit is contained in:
parent
1dab8ba334
commit
f8b5464f31
1 changed files with 1 additions and 0 deletions
|
|
@ -50,6 +50,7 @@ proc methodCall*(n: PNode; conf: ConfigRef): PNode =
|
|||
# replace ordinary method by dispatcher method:
|
||||
let disp = getDispatcher(result[0].sym)
|
||||
if disp != nil:
|
||||
result[0].typ = disp.typ
|
||||
result[0].sym = disp
|
||||
# change the arguments to up/downcasts to fit the dispatcher's parameters:
|
||||
for i in 1..<result.len:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue