summaryrefslogtreecommitdiff
path: root/compiler/symtype.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-13 21:46:29 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-05-13 21:46:29 +0000
commit35166f863b24975a8a56f031255aa8af5c1e3cee (patch)
tree8278536725e4aa39eec73509f4923ff44bd5cad8 /compiler/symtype.pas
parent2f1d01c15c9a5bbd13e21f6c38e043b77851faef (diff)
downloadfpc-35166f863b24975a8a56f031255aa8af5c1e3cee.tar.gz
- removed tabstractrecorddef.get_unit_symtable, which did not always return the unit
symtable (when you had a local recorddef in a procdef) * modified tdef.get_top_level_symtable() so you can specify whether you want to skip procdefs or not * changed tobjectdef.vmt_def() to no longer require a typesym for the tobjectdef (based on patch by Blaise) git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@45361 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/symtype.pas')
-rw-r--r--compiler/symtype.pas7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/symtype.pas b/compiler/symtype.pas
index 8d90f4c3bd..a149911593 100644
--- a/compiler/symtype.pas
+++ b/compiler/symtype.pas
@@ -97,7 +97,7 @@ interface
procedure ChangeOwner(st:TSymtable);
function getreusablesymtab: tsymtable;
procedure register_created_object_type;virtual;
- function get_top_level_symtable: tsymtable;
+ function get_top_level_symtable(skipprocdefs: boolean): tsymtable;
{ only valid for registered defs and defs for which a unique id string
has been requested; otherwise, first call register_def }
function deflist_index: longint;
@@ -442,11 +442,12 @@ implementation
end;
- function tdef.get_top_level_symtable: tsymtable;
+ function tdef.get_top_level_symtable(skipprocdefs: boolean): tsymtable;
begin
result:=owner;
while assigned(result) and
- assigned(result.defowner) do
+ assigned(result.defowner) and
+ (skipprocdefs or (result.symtabletype in [ObjectSymtable,recordsymtable])) do
result:=tdef(result.defowner).owner;
end;