diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-09 14:20:01 +0530 |
---|---|---|
committer | Neelesh Chandola <neelesh.chandola@outlook.com> | 2018-12-09 14:20:01 +0530 |
commit | e44641b6cb025b689298584418e91844b1ac5a4a (patch) | |
tree | 235a7f7193791e01b1b3b1deeb449e21b488fd31 /tests | |
parent | d977fc6f320ea7aed97de0d883b6da27f7de61c4 (diff) | |
download | Nim-e44641b6cb025b689298584418e91844b1ac5a4a.tar.gz |
Float values are invalid in enum
Diffstat (limited to 'tests')
-rw-r--r-- | tests/errmsgs/t9908_01.nim (renamed from tests/errmsgs/t9908.nim) | 4 | ||||
-rw-r--r-- | tests/errmsgs/t9908_02.nim | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/errmsgs/t9908.nim b/tests/errmsgs/t9908_01.nim index fa086517f..b9d37b67b 100644 --- a/tests/errmsgs/t9908.nim +++ b/tests/errmsgs/t9908_01.nim @@ -6,5 +6,5 @@ line: 10 # https://github.com/nim-lang/Nim/issues/9908 type - X = enum - a = ("a", "b") + X = enum + a = ("a", "b") diff --git a/tests/errmsgs/t9908_02.nim b/tests/errmsgs/t9908_02.nim new file mode 100644 index 000000000..7ff3d1ff7 --- /dev/null +++ b/tests/errmsgs/t9908_02.nim @@ -0,0 +1,10 @@ +discard """ +errormsg: "ordinal type expected" +line: 10 +""" + +# https://github.com/nim-lang/Nim/pull/9909#issuecomment-445519287 + +type + E = enum + myVal = 80.9 |