Parcourir la source

* assert that any exported promising function is not synthetic

Nikolay Nikolov il y a 2 ans
Parent
commit
601c8f9c8b
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      compiler/systems/t_wasi.pas

+ 2 - 0
compiler/systems/t_wasi.pas

@@ -252,6 +252,8 @@ begin
   pd:=tcpuprocdef(tprocsym(hp.sym).ProcdefList[0]);
   if eo_promising_first in hp.options then
     begin
+      if (pd.synthetickind<>tsk_none) and (pd.synthetickind<>tsk_wasm_promising) then
+        internalerror(2023061301);
       pd.synthetickind:=tsk_wasm_promising;
       pd.promising_export_name:=hp.name^;
     end