summary refs log blame commit diff stats
path: root/tests/enum/tenum3.nim
blob: 49cbf04d595a9ba66b7a62648f822e76fc60c23a (plain) (tree)
1
2
3
4
5
6
7
8
9
10


                              
                                        


           
 

                   
 




               
# 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"