diff options
author | Bung <crc32@qq.com> | 2022-10-02 00:17:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-01 18:17:07 +0200 |
commit | cbd9fee22ac7063c66cc9aa38f20e78df082e387 (patch) | |
tree | f70e1b4678b55237e70304f0767f1daf02d5eeb8 /tests/range | |
parent | 8d47bf1822f7d7886ff62f6d14abe405f9f68ed7 (diff) | |
download | Nim-cbd9fee22ac7063c66cc9aa38f20e78df082e387.tar.gz |
fix #19678 Broken behavior with string ranges in case labels (#20475)
* fix #19678 Broken behavior with string ranges in case labels * Update compiler/semtypes.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'tests/range')
-rw-r--r-- | tests/range/t19678.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/range/t19678.nim b/tests/range/t19678.nim new file mode 100644 index 000000000..88f7eff89 --- /dev/null +++ b/tests/range/t19678.nim @@ -0,0 +1,17 @@ +discard """ + cmd: "nim check --hints:off $file" + errormsg: "" + nimout: ''' +t19678.nim(13, 13) Error: range of string is invalid + + + +''' +""" + +case "5": + of "0" .. "9": + discard + else: + discard + |