implements overloadable enum values; WIP (#18470)

* implements overloadable enum values
* simpler code
This commit is contained in:
Andreas Rumpf 2021-07-28 12:46:28 +02:00 • committed by GitHub
commit a273ea70e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 125 additions and 11 deletions

View file

@ -2,7 +2,6 @@ discard """
action:reject
cmd: "nim check $options $file"
nimout: '''
t10251.nim(15, 5) Error: redefinition of 'foo'; previous declaration here: t10251.nim(13, 5)
t10251.nim(19, 23) Error: redefinition of 'goo1'; previous declaration here: t10251.nim(19, 11)
'''
"""
@ -14,6 +13,7 @@ type
Enum2 = enum
foo, bar, baz
type
Enum3 {.pure.} = enum # fixed (by accident?) in https://github.com/nim-lang/Nim/pull/18263
goo0, goo1, goo2, goo1