Quellcode durchsuchen

compiler: redo type search in parent classes. previous trial breaks objective pascal implementation

git-svn-id: trunk@16505 -
paul vor 14 Jahren
Ursprung
Commit
af39178e06
3 geänderte Dateien mit 5 neuen und 8 gelöschten Zeilen
  1. 2 2
      compiler/pdecobj.pas
  2. 1 2
      compiler/ptype.pas
  3. 2 4
      compiler/symtable.pas

+ 2 - 2
compiler/pdecobj.pas

@@ -1047,11 +1047,11 @@ implementation
             { parse optional GUID for interfaces }
             parse_guid;
 
-            push_child_hierarcy(current_objectdef);
+            symtablestack.push(current_objectdef.symtable);
             insert_generic_parameter_types(genericdef,genericlist);
             { parse and insert object members }
             parse_object_members;
-            pop_child_hierarchy(current_objectdef);
+            symtablestack.pop(current_objectdef.symtable);
           end;
 
         { generate vmt space if needed }

+ 1 - 2
compiler/ptype.pas

@@ -396,8 +396,7 @@ implementation
                 end;
              objdef:=tobjectdef(tobjectdef(objdef).owner.defowner);
            end;
-         { Use the special searchsym_type that ignores records,objects and
-           parameters }
+         { Use the special searchsym_type that ignores records and parameters }
          searchsym_type(s,srsym,srsymtable);
          { handle unit specification like System.Writeln }
          is_unit_specific:=try_consume_unitsym(srsym,srsymtable,t);

+ 2 - 4
compiler/symtable.pas

@@ -1856,10 +1856,9 @@ implementation
                   end;
               end;
             { also search for class helpers }
-            if (srsymtable.symtabletype=objectsymtable) and
-               is_objcclass(tdef(srsymtable.defowner)) then
+            if (srsymtable.symtabletype=objectsymtable) then
               begin
-                if search_class_helper(tobjectdef(srsymtable.defowner),s,srsym,srsymtable) then
+                if searchsym_in_class(tobjectdef(srsymtable.defowner),tobjectdef(srsymtable.defowner),s,srsym,srsymtable) then
                   begin
                     result:=true;
                     exit;
@@ -1885,7 +1884,6 @@ implementation
             {
               It is not possible to have type symbols in:
                 records
-                objects
                 parameters
               Exception are classes, objects, generic definitions and specializations
               that have the parameterized types inserted in the symtable.