summary refs log tree commit diff stats
path: root/tests/errmsgs/tconstinfo.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errmsgs/tconstinfo.nim')
-rw-r--r--tests/errmsgs/tconstinfo.nim7
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