Browse Source

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

Nikolay Nikolov 1 năm trước cách đây
mục cha
commit
54d65ff75c
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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);