summaryrefslogtreecommitdiff
path: root/compiler/pdecl.pas
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pdecl.pas')
-rw-r--r--compiler/pdecl.pas7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/pdecl.pas b/compiler/pdecl.pas
index 277d0630f9..63c1bb219a 100644
--- a/compiler/pdecl.pas
+++ b/compiler/pdecl.pas
@@ -397,7 +397,6 @@ implementation
typename,orgtypename : TIDString;
newtype : ttypesym;
sym : tsym;
- srsymtable : TSymtable;
hdef : tdef;
defpos,storetokenpos : tfileposinfo;
old_block_type : tblock_type;
@@ -462,8 +461,10 @@ implementation
current_scanner.startrecordtokens(generictokenbuf);
end;
- { is the type already defined? }
- searchsym(typename,sym,srsymtable);
+ { is the type already defined? -- must be in the current symtable,
+ not in a nested symtable or one higher up the stack -> don't
+ use searchsym & frinds! }
+ sym:=tsym(symtablestack.top.find(typename));
newtype:=nil;
{ found a symbol with this name? }
if assigned(sym) then