From f8b5464f31834bf97e7f9023644e255f2e9b6485 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Sat, 29 Oct 2022 18:12:19 +0200 Subject: [PATCH] fix dispatcher call type [backport] (#20696) fix dispatcher call type The call node should have the type of the dispatcher, not the static call --- compiler/cgmeth.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim index 8fe8f225c0..4940a9093a 100644 --- a/compiler/cgmeth.nim +++ b/compiler/cgmeth.nim @@ -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..