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>
This commit is contained in:
Andreas Rumpf 2021-07-21 08:51:03 +02:00 • committed by GitHub
commit 70fb377e88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 15 deletions

View file

@ -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