浏览代码

* assert that any exported promising function is not synthetic

Nikolay Nikolov 2 年之前
父节点
当前提交
601c8f9c8b
共有 1 个文件被更改,包括 2 次插入0 次删除
  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