Browse Source

* record and object declaration with same field as type fixed

peter 24 years ago
parent
commit
891a5e27b4
1 changed files with 14 additions and 14 deletions
  1. 14 14
      compiler/pdecvar.pas

+ 14 - 14
compiler/pdecvar.pas

@@ -163,17 +163,17 @@ implementation
              { this is needed for Delphi mode at least
              { this is needed for Delphi mode at least
                but should be OK for all modes !! (PM) }
                but should be OK for all modes !! (PM) }
              ignore_equal:=true;
              ignore_equal:=true;
-             if is_record or is_object then
+             if is_record then
               begin
               begin
                 { for records, don't search the recordsymtable for
                 { for records, don't search the recordsymtable for
                   the symbols of the types }
                   the symbols of the types }
-                oldsymtablestack:=symtablestack;
-                symtablestack:=symtablestack^.next;
+                    oldsymtablestack:=symtablestack;
+                    symtablestack:=symtablestack^.next;
                 read_type(tt,'');
                 read_type(tt,'');
-                symtablestack:=oldsymtablestack;
-              end
-             else
-              read_type(tt,'');
+                    symtablestack:=oldsymtablestack;
+                  end
+                 else
+                  read_type(tt,'');
              if (variantrecordlevel>0) and tt.def^.needs_inittable then
              if (variantrecordlevel>0) and tt.def^.needs_inittable then
                Message(parser_e_cant_use_inittable_here);
                Message(parser_e_cant_use_inittable_here);
              ignore_equal:=false;
              ignore_equal:=false;
@@ -451,10 +451,10 @@ implementation
                  { for records, don't search the recordsymtable for
                  { for records, don't search the recordsymtable for
                    the symbols of the types }
                    the symbols of the types }
                  oldsymtablestack:=symtablestack;
                  oldsymtablestack:=symtablestack;
-                 symtablestack:=symtablestack^.next;
+                     symtablestack:=symtablestack^.next;
                  read_type(casetype,'');
                  read_type(casetype,'');
-                 symtablestack:=oldsymtablestack;
-               end
+                     symtablestack:=oldsymtablestack;
+                   end
               else
               else
                 begin
                 begin
                   consume(_ID);
                   consume(_ID);
@@ -462,9 +462,9 @@ implementation
                   { for records, don't search the recordsymtable for
                   { for records, don't search the recordsymtable for
                     the symbols of the types }
                     the symbols of the types }
                   oldsymtablestack:=symtablestack;
                   oldsymtablestack:=symtablestack;
-                  symtablestack:=symtablestack^.next;
+                      symtablestack:=symtablestack^.next;
                   read_type(casetype,'');
                   read_type(casetype,'');
-                  symtablestack:=oldsymtablestack;
+                      symtablestack:=oldsymtablestack;
                   symtablestack^.insert(new(pvarsym,init(s,casetype)));
                   symtablestack^.insert(new(pvarsym,init(s,casetype)));
                 end;
                 end;
               if not(is_ordinal(casetype.def)) or is_64bitint(casetype.def)  then
               if not(is_ordinal(casetype.def)) or is_64bitint(casetype.def)  then
@@ -538,8 +538,8 @@ implementation
 end.
 end.
 {
 {
   $Log$
   $Log$
-  Revision 1.8  2001-02-20 18:35:35  peter
-    * same fix for objects and classes
+  Revision 1.9  2001-02-20 21:42:54  peter
+    * record and object declaration with same field as type fixed
 
 
   Revision 1.7  2001/02/20 11:19:45  marco
   Revision 1.7  2001/02/20 11:19:45  marco
    * Fix passing tvarrec to array of const
    * Fix passing tvarrec to array of const