fpc/tests/test/tenum5.pp
paul 1b614b526a compiler:
- add own symbol table for enumeration to store enumeration elements
  - reimplement enumeration member traverse using symbol table instead of firstenum/nextenum - that members are removed
  - implement TEnum.Element access syntax - element is searched in the enumeration symtable in this case instead of global/local symtables
  - implement {$SCOPEDENUM ON/OFF} local switch
  + tests

git-svn-id: trunk@15051 -
2010-03-25 05:46:53 +00:00

18 lines
333 B
ObjectPascal

{ %fail}
{ %norun}
// test checks that enumeration searches symbols only in the own symbol list
// if they are prefixed by the enumeration name
program tenum5;
type
{$SCOPEDENUMS ON}
TEnum1 = (first, second, third);
{$SCOPEDENUMS OFF}
TEnum2 = (zero, first, second, third);
var
En1: TEnum1;
begin
En1 := TEnum1.zero;
end.