summary refs log tree commit diff stats
path: root/tests/enum/tbasicenum.nim
blob: eb2182f71df87dad6048660ed361618811dcc83e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
discard """
  file: "tbasicenum.nim"
  output: "ABCDC"
"""

type
  MyEnum = enum
    A,B,C,D
# trick the optimizer with an seq:
var x = @[A,B,C,D]
echo x[0],x[1],x[2],x[3],MyEnum(2)