diff options
Diffstat (limited to 'tests/parser/twhen_in_enum.nim')
-rw-r--r-- | tests/parser/twhen_in_enum.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/parser/twhen_in_enum.nim b/tests/parser/twhen_in_enum.nim new file mode 100644 index 000000000..d4a3ea56a --- /dev/null +++ b/tests/parser/twhen_in_enum.nim @@ -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 + |