mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
* fixes #21207; reports redefinition in the enums * add a test
This commit is contained in:
9
tests/enum/tredefinition.nim
Normal file
9
tests/enum/tredefinition.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
cmd: '''nim check --hints:off $file'''
|
||||
action: reject
|
||||
nimout: '''
|
||||
tredefinition.nim(9, 25) Error: redefinition of 'Key_a'; previous declaration here: tredefinition.nim(9, 18)
|
||||
'''
|
||||
"""
|
||||
|
||||
type Key* = enum Key_A, Key_a
|
||||
Reference in New Issue
Block a user