diff options
author | paul <paul@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-03-30 07:09:44 +0000 |
---|---|---|
committer | paul <paul@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-03-30 07:09:44 +0000 |
commit | da1909bbfa2d11efefaedaa96b77d8972152b737 (patch) | |
tree | 5470ba4baddb44a142efa304a4712c3ec525e8f2 /compiler/ptconst.pas | |
parent | 65e87f0ef5b3ccdba9e05e86c16c2a50c66ed45d (diff) | |
download | fpc-da1909bbfa2d11efefaedaa96b77d8972152b737.tar.gz |
compiler: fix parsing and handling of typed constants declared inside classes/objects + tests
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@15094 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/ptconst.pas')
-rw-r--r-- | compiler/ptconst.pas | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/ptconst.pas b/compiler/ptconst.pas index d0d85cd438..7d3758db0b 100644 --- a/compiler/ptconst.pas +++ b/compiler/ptconst.pas @@ -27,7 +27,7 @@ interface uses symtype,symsym,aasmdata; - procedure read_typed_const(list:tasmlist;sym:tstaticvarsym); + procedure read_typed_const(list:tasmlist;sym:tstaticvarsym;in_class:boolean); implementation @@ -1375,7 +1375,7 @@ implementation {$maxfpuregisters default} - procedure read_typed_const(list:tasmlist;sym:tstaticvarsym); + procedure read_typed_const(list:tasmlist;sym:tstaticvarsym;in_class:boolean); var storefilepos : tfileposinfo; cursectype : TAsmSectionType; @@ -1407,7 +1407,8 @@ implementation consume(_SEMICOLON); { parse public/external/export/... } - if ( + if not in_class and + ( ( (token = _ID) and (idtoken in [_EXPORT,_EXTERNAL,_WEAKEXTERNAL,_PUBLIC,_CVAR]) and |