From 02704f85a925475c71663e5db5ddf1700c00ceef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Van=20Canneyt?= Date: Mon, 6 May 2024 15:49:06 +0200 Subject: [PATCH] * Wasm: generator for invoke helper now handles overloaded methods in interfaces --- compiler/symcreat.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/symcreat.pas b/compiler/symcreat.pas index 7ad10cfff4..6645b2b3df 100644 --- a/compiler/symcreat.pas +++ b/compiler/symcreat.pas @@ -1232,7 +1232,7 @@ implementation function str_parse_method(str: ansistring): tprocdef; forward; - procedure implement_invoke_helper(cn : string;pd: tprocdef); + procedure implement_invoke_helper(cn : string;pd: tprocdef; idx : integer); var sarg,str : ansistring; @@ -1246,7 +1246,7 @@ implementation begin str:='procedure __invoke_helper__'; pn:=pd.procsym.realname; - str:=str+cn+'__'+pn; + str:=str+cn+'__'+pn+'_'+tostr(idx); for I:=1 to length(str) do if str[i]='.' then str[i]:='_'; @@ -1412,7 +1412,7 @@ implementation cn:=tobjectdef(def.owner.defowner).GetTypeName else internalerror(2023061107); - implement_invoke_helper(cn,pd); + implement_invoke_helper(cn,pd,i); end; end; end;