summary refs log tree commit diff stats
path: root/tests/js/tbasicenum.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tbasicenum.nim')
-rw-r--r--tests/js/tbasicenum.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/js/tbasicenum.nim b/tests/js/tbasicenum.nim
new file mode 100644
index 000000000..a9e9ce2da
--- /dev/null
+++ b/tests/js/tbasicenum.nim
@@ -0,0 +1,10 @@
+discard """
+  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