mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 16:06:09 +02:00
compiler: redo type search in parent classes. previous trial breaks objective pascal implementation
git-svn-id: trunk@16505 -
This commit is contained in:
parent
69c89d4579
commit
af39178e06
@ -1047,11 +1047,11 @@ implementation
|
|||||||
{ parse optional GUID for interfaces }
|
{ parse optional GUID for interfaces }
|
||||||
parse_guid;
|
parse_guid;
|
||||||
|
|
||||||
push_child_hierarcy(current_objectdef);
|
symtablestack.push(current_objectdef.symtable);
|
||||||
insert_generic_parameter_types(genericdef,genericlist);
|
insert_generic_parameter_types(genericdef,genericlist);
|
||||||
{ parse and insert object members }
|
{ parse and insert object members }
|
||||||
parse_object_members;
|
parse_object_members;
|
||||||
pop_child_hierarchy(current_objectdef);
|
symtablestack.pop(current_objectdef.symtable);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ generate vmt space if needed }
|
{ generate vmt space if needed }
|
||||||
|
@ -396,8 +396,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
objdef:=tobjectdef(tobjectdef(objdef).owner.defowner);
|
objdef:=tobjectdef(tobjectdef(objdef).owner.defowner);
|
||||||
end;
|
end;
|
||||||
{ Use the special searchsym_type that ignores records,objects and
|
{ Use the special searchsym_type that ignores records and parameters }
|
||||||
parameters }
|
|
||||||
searchsym_type(s,srsym,srsymtable);
|
searchsym_type(s,srsym,srsymtable);
|
||||||
{ handle unit specification like System.Writeln }
|
{ handle unit specification like System.Writeln }
|
||||||
is_unit_specific:=try_consume_unitsym(srsym,srsymtable,t);
|
is_unit_specific:=try_consume_unitsym(srsym,srsymtable,t);
|
||||||
|
@ -1856,10 +1856,9 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
{ also search for class helpers }
|
{ also search for class helpers }
|
||||||
if (srsymtable.symtabletype=objectsymtable) and
|
if (srsymtable.symtabletype=objectsymtable) then
|
||||||
is_objcclass(tdef(srsymtable.defowner)) then
|
|
||||||
begin
|
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
|
begin
|
||||||
result:=true;
|
result:=true;
|
||||||
exit;
|
exit;
|
||||||
@ -1885,7 +1884,6 @@ implementation
|
|||||||
{
|
{
|
||||||
It is not possible to have type symbols in:
|
It is not possible to have type symbols in:
|
||||||
records
|
records
|
||||||
objects
|
|
||||||
parameters
|
parameters
|
||||||
Exception are classes, objects, generic definitions and specializations
|
Exception are classes, objects, generic definitions and specializations
|
||||||
that have the parameterized types inserted in the symtable.
|
that have the parameterized types inserted in the symtable.
|
||||||
|
Loading…
Reference in New Issue
Block a user