From f8b5464f31834bf97e7f9023644e255f2e9b6485 Mon Sep 17 00:00:00 2001 From: Jacek Sieka Date: Sat, 29 Oct 2022 18:12:19 +0200 Subject: 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 8fe8f225c..4940a9093 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.. This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)ahoang <ahoang@tilde.institute>
summary refs log blame commit diff stats
blob: 2c3d872df019edd1ac922183310d168a2e42dc64 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13