diff --git a/compiler/wasm32/nwasmcal.pas b/compiler/wasm32/nwasmcal.pas index 77c26f096e..565bb2423b 100644 --- a/compiler/wasm32/nwasmcal.pas +++ b/compiler/wasm32/nwasmcal.pas @@ -70,8 +70,8 @@ implementation begin pvs:=tparavarsym(procdefinition.paras[paranr]); if is_wasm_reference_type(p.left.resultdef) and - (pvs.varspez in [vs_var,vs_constref]) or - ((pvs.varspez=vs_const) and (pvs.vardef.typ=formaldef)) then + ((pvs.varspez in [vs_var,vs_constref,vs_out]) or + ((pvs.varspez=vs_const) and (pvs.vardef.typ=formaldef))) then CGMessage(parser_e_wasm_ref_types_can_only_be_passed_by_value); Inc(paranr); p:=tcallparanode(tcallparanode(p).right);