Selaa lähdekoodia

JVM: add typesym for anonymous record typed constants

Fixes compilation of system unit with JVM compiler after b38d13577f943
Jonas Maebe 2 vuotta sitten
vanhempi
commit
7f41bb4718
3 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 2 1
      compiler/pdecl.pas
  2. 1 0
      compiler/pdecvar.pas
  3. 2 2
      compiler/symutil.pas

+ 2 - 1
compiler/pdecl.pas

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

+ 1 - 0
compiler/pdecvar.pas

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

+ 2 - 2
compiler/symutil.pas

@@ -34,7 +34,7 @@ interface
 
     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;
 
@@ -125,7 +125,7 @@ implementation
       end;
 
 
-    procedure maybe_guarantee_record_typesym(var def: tdef; st: tsymtable);
+    procedure maybe_guarantee_record_typesym(def: tdef; st: tsymtable);
       var
         ts: ttypesym;
       begin