summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/test/tenum4.pp
blob: 37fefc1050991c4bf08f2ec9f511a54e86ac724f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ %fail}
{ %norun}

// test checks that enumeration memebers are not present in the global/local symtables 
// if enumeration is defined with scopedenums directive

program tenum4;
type
{$SCOPEDENUMS ON}
  TEnum1 = (first, second, third);
{$SCOPEDENUMS OFF}
  TEnum2 = (zero, first, second, third);
var
  En1: TEnum1;
begin
  // this is not possible since first belongs to TEnum2
  En1 := first;
end.