diff options
Diffstat (limited to 'tests/enum/tbasicenum.nim')
-rw-r--r-- | tests/enum/tbasicenum.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/enum/tbasicenum.nim b/tests/enum/tbasicenum.nim new file mode 100644 index 000000000..eb2182f71 --- /dev/null +++ b/tests/enum/tbasicenum.nim @@ -0,0 +1,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) \ No newline at end of file |