summary refs log tree commit diff stats
path: root/tests/enum/tenum3.nim
blob: 49cbf04d595a9ba66b7a62648f822e76fc60c23a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Test enum with explicit size

type
  TEnumHole {.size: sizeof(int).} = enum
    eA = 0,
    eB = 4,
    eC = 5

var
  e: TEnumHole = eB

case e
of eA: echo "A"
of eB: echo "B"
of eC: echo "C"