JVM: add typesym for anonymous record typed constants

Fixes compilation of system unit with JVM compiler after b38d13577f
This commit is contained in:
Jonas Maebe 2023-02-04 12:23:29 +01:00
parent 9c10167b6f
commit 7f41bb4718
3 changed files with 5 additions and 3 deletions

View File

@ -59,7 +59,7 @@ implementation
globals,tokens,verbose,widestr,constexp, globals,tokens,verbose,widestr,constexp,
systems,aasmdata,fmodule,compinnr, systems,aasmdata,fmodule,compinnr,
{ symtable } { symtable }
symconst,symbase,symcpu,symcreat,defutil,defcmp,symtable, symconst,symbase,symcpu,symcreat,defutil,defcmp,symtable,symutil,
{ pass 1 } { pass 1 }
ninl,ncon,nobj,ngenutil,nld,nmem,ncal,pass_1, ninl,ncon,nobj,ngenutil,nld,nmem,ncal,pass_1,
{ parser } { parser }
@ -352,6 +352,7 @@ implementation
if not skip_initialiser then if not skip_initialiser then
begin begin
consume(_EQ); consume(_EQ);
maybe_guarantee_record_typesym(tstaticvarsym(sym).vardef,tstaticvarsym(sym).vardef.owner);
read_typed_const(current_asmdata.asmlists[asmtype],tstaticvarsym(sym),in_structure); read_typed_const(current_asmdata.asmlists[asmtype],tstaticvarsym(sym),in_structure);
end; end;
end; end;

View File

@ -1155,6 +1155,7 @@ implementation
end; end;
staticvarsym : staticvarsym :
begin begin
maybe_guarantee_record_typesym(vs.vardef,vs.vardef.owner);
read_typed_const(current_asmdata.asmlists[al_typedconsts],tstaticvarsym(vs),false); read_typed_const(current_asmdata.asmlists[al_typedconsts],tstaticvarsym(vs),false);
end; end;
else else

View File

@ -34,7 +34,7 @@ interface
function get_first_proc_str(Options: TProcOptions): ShortString; function get_first_proc_str(Options: TProcOptions): ShortString;
procedure maybe_guarantee_record_typesym(var def: tdef; st: tsymtable); procedure maybe_guarantee_record_typesym(def: tdef; st: tsymtable);
function is_normal_fieldvarsym(sym: tsym): boolean; inline; function is_normal_fieldvarsym(sym: tsym): boolean; inline;
@ -125,7 +125,7 @@ implementation
end; end;
procedure maybe_guarantee_record_typesym(var def: tdef; st: tsymtable); procedure maybe_guarantee_record_typesym(def: tdef; st: tsymtable);
var var
ts: ttypesym; ts: ttypesym;
begin begin