summaryrefslogtreecommitdiff
path: root/compiler/pdecl.pas
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2011-04-10 19:20:48 +0000
commit160cc1e115eeb75638dce6effdd16b2bc810ddb4 (patch)
treeb791a95695a7cf674e61a6153139c6f9c6c491fa /compiler/pdecl.pas
parent3843727e74b31bbf2a34e7e3b89ee422269f770e (diff)
parent413a6aa6469e6c297780217a27ca91363c637944 (diff)
downloadfpc-avr.tar.gz
* rebase to trunk@17295avr
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/avr@17296 3ad0048d-3df7-0310-abae-a5850022a9f2
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