summary refs log tree commit diff stats
path: root/tests/enum/tenum_self.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/enum/tenum_self.nim')
-rw-r--r--tests/enum/tenum_self.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/enum/tenum_self.nim b/tests/enum/tenum_self.nim
new file mode 100644
index 000000000..27b1c3204
--- /dev/null
+++ b/tests/enum/tenum_self.nim
@@ -0,0 +1,11 @@
+discard """
+  errormsg: "1 can't be converted to ErrorFoo"
+"""
+
+
+type
+  Foo = enum
+    Bar = 0.Foo
+
+  ErrorFoo = enum
+    eBar = 1.ErrorFoo