diff options
author | metagn <metagngn@gmail.com> | 2022-12-27 23:24:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 21:24:00 +0100 |
commit | 56840931355fdf8ce12a59ad085d90b04404f831 (patch) | |
tree | 201203d0cba7bfaa7c3dc35dda80fdb8b0f94d01 /tests | |
parent | 82d80e6e2cb09652e15d8ec81621bba734872aaa (diff) | |
download | Nim-56840931355fdf8ce12a59ad085d90b04404f831.tar.gz |
fix for bad error message with const in case statement (#21182)
* preliminary fix for bad error message with const * add test case * fix tmatrixconcept and tmatrixlib
Diffstat (limited to 'tests')
-rw-r--r-- | tests/errmsgs/tconstinfo.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/errmsgs/tconstinfo.nim b/tests/errmsgs/tconstinfo.nim new file mode 100644 index 000000000..170972b9f --- /dev/null +++ b/tests/errmsgs/tconstinfo.nim @@ -0,0 +1,7 @@ +# https://forum.nim-lang.org/t/9762 + +const foo = "abc" +case 'a' +of foo: echo "should error" #[tt.Error + ^ type mismatch: got <string> but expected 'char']# +else: discard |