Ver Fonte

* disallow passing WebAssembly reference types as untyped out parameters as well

Nikolay Nikolov há 2 anos atrás
pai
commit
64569df017
1 ficheiros alterados com 21 adições e 0 exclusões
  1. 21 0
      tests/test/wasm/twasmexternref4f.pp

+ 21 - 0
tests/test/wasm/twasmexternref4f.pp

@@ -0,0 +1,21 @@
+{ %cpu=wasm32 }
+{ %fail }
+
+program twasmexternref4f;
+
+{$MODE objfpc}
+
+procedure testproc(out p);
+begin
+end;
+
+procedure testproc2;
+var
+  q: WasmExternRef;
+begin
+  { WasmExternRef cannot be passed as an untyped out parameter }
+  testproc(q);
+end;
+
+begin
+end.