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
This commit is contained in:
parent
82d80e6e2c
commit
5684093135
2 changed files with 11 additions and 0 deletions
7
tests/errmsgs/tconstinfo.nim
Normal file
7
tests/errmsgs/tconstinfo.nim
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue