浏览代码

* WebAssembly: fixed crash when attempting to generate a functype directive for
a generic function

Nikolay Nikolov 11 月之前
父节点
当前提交
54d65ff75c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/wasm32/hlcgcpu.pas

+ 2 - 1
compiler/wasm32/hlcgcpu.pas

@@ -2459,7 +2459,8 @@ implementation
 
   procedure thlcgwasm.g_procdef(list: TAsmList; pd: tprocdef);
     begin
-      list.Concat(tai_functype.create(pd.mangledname,tcpuprocdef(pd).create_functype));
+      if not pd.is_generic then
+        list.Concat(tai_functype.create(pd.mangledname,tcpuprocdef(pd).create_functype));
     end;
 
   procedure thlcgwasm.g_maybe_checkforexceptions(list: TasmList);