summary refs log tree commit diff stats
path: root/tests/misc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-07-22 11:59:21 +0200
committerGitHub <noreply@github.com>2021-07-22 11:59:21 +0200
commit0c4582c66524d58a3c72827d9546a5c5f1c40286 (patch)
treede195aa39e39b70835c3377fb20680675b2bb9c1 /tests/misc
parent58e27ebd4a16ca9f2ba24826d7162384d5321101 (diff)
downloadNim-0c4582c66524d58a3c72827d9546a5c5f1c40286.tar.gz
mitigates #12815 (#18557)
* mitigates #12815

* Update doc/nimc.rst

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/tconv.nim17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/misc/tconv.nim b/tests/misc/tconv.nim
index ff6875021..5e8eac729 100644
--- a/tests/misc/tconv.nim
+++ b/tests/misc/tconv.nim
@@ -95,13 +95,26 @@ reject:
 {.push warning[AnyEnumConv]:on, warningAsError[AnyEnumConv]:on.}
 
 reject:
-  # bug #12815
   type
     Foo = enum
+      one
+      three
+
+  var va = 2
+  var vb = va.Foo
+
+{.pop.}
+
+{.push warningAsError[HoleEnumConv]:on.}
+
+reject:
+  # bug #12815
+  type
+    Hole = enum
       one = 1
       three = 3
 
   var va = 2
-  var vb = va.Foo
+  var vb = va.Hole
 
 {.pop.}