summary refs log tree commit diff stats
path: root/tests/misc
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2021-07-21 08:51:03 +0200
committerGitHub <noreply@github.com>2021-07-21 08:51:03 +0200
commit70fb377e88a73332974fc488b17d4b90dd6fd22a (patch)
tree03a62d2410534c6a0f18fc141182342324341802 /tests/misc
parentf8519657c43f458db9c915cec62c59022041eb05 (diff)
downloadNim-70fb377e88a73332974fc488b17d4b90dd6fd22a.tar.gz
undo RFC #294, it breaks code for no good reason, the compiler can wa… (#18546)
* undo RFC #294, it breaks code for no good reason, the compiler can warn about the construct instead

* Update changelog.md

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

* enable test case

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/tconv.nim8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/misc/tconv.nim b/tests/misc/tconv.nim
index c93fc57f8..94677b1bf 100644
--- a/tests/misc/tconv.nim
+++ b/tests/misc/tconv.nim
@@ -1,7 +1,5 @@
 discard """
-  nimout:'''
-tconv.nim(81, 15) Warning: enum to enum conversion is now deprecated [User]
-'''
+  matrix: "--warningAsError:EnumConv"
 """
 
 template reject(x) =
@@ -77,12 +75,12 @@ block: # https://github.com/nim-lang/RFCs/issues/294
   reject: k2.Goo
   reject: k2.string
 
-  {.define(nimLegacyConvEnumEnum).}
+  {.push warningAsError[EnumConv]:off.}
   discard Goo(k2)
   accept: Goo(k2)
   accept: k2.Goo
   reject: k2.string
-  {.undef(nimLegacyConvEnumEnum).}
+  {.pop.}
 
   reject: Goo(k2)
   reject: k2.Goo