summary refs log tree commit diff stats
path: root/tests/enum/t21863.nim
blob: d0d8b1fcd890f1bbfe5f04c64336153ed2d2a2f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
discard """
cmd: "nim check --hints:off $file"
action: reject
nimout: '''
t21863.nim(28, 16) Error: undeclared field: 'A' 
  found 'A' [enumField declared in t21863.nim(24, 18)]
  found 'A' [enumField declared in t21863.nim(25, 18)]
t21863.nim(28, 16) Error: undeclared field: '.'
t21863.nim(28, 16) Error: undeclared field: '.'
t21863.nim(28, 16) Error: expression '' has no type (or is ambiguous)
'''
"""









block:
  type
    EnumA = enum A, B
    EnumB = enum A
    EnumC = enum C

  discard EnumC.A