+ also test that pointers cannot be converted to externref implicitly

This commit is contained in:
Nikolay Nikolov 2023-06-11 05:56:49 +03:00
parent a47a1c093a
commit 7abe3eeb84
4 changed files with 34 additions and 2 deletions

View File

@ -8,7 +8,7 @@ var
p: WasmExternRef;
q: Pointer;
begin
{ WasmExternRef cannot be converted to pointer }
{ WasmExternRef cannot be explicitly converted to pointer }
q := Pointer(p);
end;

View File

@ -8,7 +8,7 @@ var
p: WasmExternRef;
q: Pointer;
begin
{ A pointer cannot be converted to WasmExternRef }
{ A pointer cannot be explicitly converted to WasmExternRef }
p := WasmExternRef(q);
end;

View File

@ -0,0 +1,16 @@
{ %cpu=wasm32 }
{ %fail }
program twasmexternref3b;
procedure testproc;
var
p: WasmExternRef;
q: Pointer;
begin
{ WasmExternRef cannot be implicitly converted to pointer }
q := p;
end;
begin
end.

View File

@ -0,0 +1,16 @@
{ %cpu=wasm32 }
{ %fail }
program twasmexternref3c;
procedure testproc;
var
p: WasmExternRef;
q: Pointer;
begin
{ A pointer cannot be implicitly converted to WasmExternRef }
p := q;
end;
begin
end.