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

git-svn-id: trunk@16505 -
This commit is contained in:
paul 2010-12-05 10:59:11 +00:00
parent 69c89d4579
commit af39178e06
3 changed files with 5 additions and 8 deletions

View File

@ -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 }

View File

@ -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);

View File

@ -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.