mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 11:06:19 +02:00
* use tcallparanode.parasym to find the tparavarsym in twasmcallnode.pass_typecheck
This commit is contained in:
parent
e6cbdba0bd
commit
d38dbcac8f
@ -57,7 +57,6 @@ implementation
|
|||||||
function twasmcallnode.pass_typecheck:tnode;
|
function twasmcallnode.pass_typecheck:tnode;
|
||||||
var
|
var
|
||||||
p: tcallparanode;
|
p: tcallparanode;
|
||||||
paranr: Integer;
|
|
||||||
pvs: tparavarsym;
|
pvs: tparavarsym;
|
||||||
begin
|
begin
|
||||||
result:=inherited;
|
result:=inherited;
|
||||||
@ -67,15 +66,14 @@ implementation
|
|||||||
if assigned(procdefinition) then
|
if assigned(procdefinition) then
|
||||||
begin
|
begin
|
||||||
p:=tcallparanode(left);
|
p:=tcallparanode(left);
|
||||||
paranr:=0;
|
|
||||||
while assigned(p) do
|
while assigned(p) do
|
||||||
begin
|
begin
|
||||||
pvs:=tparavarsym(procdefinition.paras[paranr]);
|
pvs:=p.parasym;
|
||||||
if assigned(p.left) and is_wasm_reference_type(p.left.resultdef) and
|
if assigned(p.left) and is_wasm_reference_type(p.left.resultdef) and
|
||||||
|
assigned(pvs) and
|
||||||
((pvs.varspez in [vs_var,vs_constref,vs_out]) or
|
((pvs.varspez in [vs_var,vs_constref,vs_out]) or
|
||||||
((pvs.varspez=vs_const) and (pvs.vardef.typ=formaldef))) then
|
((pvs.varspez=vs_const) and (pvs.vardef.typ=formaldef))) then
|
||||||
CGMessage(parser_e_wasm_ref_types_can_only_be_passed_by_value);
|
CGMessage(parser_e_wasm_ref_types_can_only_be_passed_by_value);
|
||||||
Inc(paranr);
|
|
||||||
p:=tcallparanode(tcallparanode(p).right);
|
p:=tcallparanode(tcallparanode(p).right);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user