mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 07:51:32 +00:00
fixes #2123
This commit is contained in:
11
tests/parser/twhen_in_enum.nim
Normal file
11
tests/parser/twhen_in_enum.nim
Normal file
@@ -0,0 +1,11 @@
|
||||
discard """
|
||||
errormsg: "identifier expected, but found 'keyword when'"
|
||||
"""
|
||||
|
||||
# bug #2123
|
||||
type num = enum
|
||||
NUM_NONE = 0
|
||||
NUM_ALL = 1
|
||||
when defined(macosx): NUM_OSX = 10 # only this differs for real
|
||||
NUM_XTRA = 20
|
||||
|
||||
Reference in New Issue
Block a user