diff options
author | Andreas Rumpf <andreas@andreas-laptop> | 2010-07-21 09:44:47 +0200 |
---|---|---|
committer | Andreas Rumpf <andreas@andreas-laptop> | 2010-07-21 09:44:47 +0200 |
commit | d10973adb00840631e5314ec902d502f15934801 (patch) | |
tree | a207854b0cf984815beb26bf2d71933ce566f6d7 /tests/accept/compile | |
parent | c441cdb64ca5394f74faadf76563bcfafeda18f4 (diff) | |
download | Nim-d10973adb00840631e5314ec902d502f15934801.tar.gz |
c2nim tool added
Diffstat (limited to 'tests/accept/compile')
-rw-r--r-- | tests/accept/compile/tenum3.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/accept/compile/tenum3.nim b/tests/accept/compile/tenum3.nim new file mode 100644 index 000000000..09a516932 --- /dev/null +++ b/tests/accept/compile/tenum3.nim @@ -0,0 +1,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" + |