diff options
author | Bung <crc32@qq.com> | 2022-11-01 17:19:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 10:19:37 +0100 |
commit | eec1543baf10715c7107133aaf6aa1e4932f53fe (patch) | |
tree | edf5ff12af3cfbb81e4ec41c78866b9d703ea62b /tests/errmsgs/tcase_stmt.nim | |
parent | 6166b796ba159f8aaeb741cc2359ae32037262eb (diff) | |
download | Nim-eec1543baf10715c7107133aaf6aa1e4932f53fe.tar.gz |
fix semcase on tySequence and tyObject #20283 #19682 (#20339)
* fix semcase on tySequence and tyObject #20283 #19682 * use better arg name * avoiding returns nil use errorNode instead, clean code * use efNoDiagnostics flag * remove tests/errmsgs/t19682.nim * combine 2 test cases to one file
Diffstat (limited to 'tests/errmsgs/tcase_stmt.nim')
-rw-r--r-- | tests/errmsgs/tcase_stmt.nim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/errmsgs/tcase_stmt.nim b/tests/errmsgs/tcase_stmt.nim new file mode 100644 index 000000000..cf63b9c17 --- /dev/null +++ b/tests/errmsgs/tcase_stmt.nim @@ -0,0 +1,29 @@ +discard """ + cmd: "nim check --hints:off $file" + errormsg: "" + nimout: ''' +tcase_stmt.nim(22, 7) Error: selector must be of an ordinal type, float or string +tcase_stmt.nim(28, 6) Error: selector must be of an ordinal type, float or string + + + + + + + +''' +""" + + + +# bug #19682 +type A = object + +case A() +else: + discard + +# bug #20283 + +case @[] +else: discard |