|
@@ -57,7 +57,7 @@ implementation
|
|
systems,
|
|
systems,
|
|
{ symtable }
|
|
{ symtable }
|
|
symconst,symbase,defutil,defcmp,symutil,symcreat,
|
|
symconst,symbase,defutil,defcmp,symutil,symcreat,
|
|
-{$if defined(i386) or defined(i8086)}
|
|
|
|
|
|
+{$if defined(i386) or defined(i8086) or defined(wasm)}
|
|
symcpu,
|
|
symcpu,
|
|
{$endif}
|
|
{$endif}
|
|
fmodule,htypechk,procdefutil,
|
|
fmodule,htypechk,procdefutil,
|
|
@@ -1779,6 +1779,10 @@ implementation
|
|
|
|
|
|
read_anon_type(hdef,false);
|
|
read_anon_type(hdef,false);
|
|
maybe_guarantee_record_typesym(hdef,symtablestack.top);
|
|
maybe_guarantee_record_typesym(hdef,symtablestack.top);
|
|
|
|
+{$ifdef wasm}
|
|
|
|
+ if is_wasm_reference_type(hdef) then
|
|
|
|
+ messagepos(typepos,sym_e_wasm_ref_types_cannot_be_used_in_records);
|
|
|
|
+{$endif wasm}
|
|
block_type:=bt_var;
|
|
block_type:=bt_var;
|
|
{ allow only static fields reference to struct where they are declared }
|
|
{ allow only static fields reference to struct where they are declared }
|
|
if not (vd_class in options) then
|
|
if not (vd_class in options) then
|