summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorVindaar <basti90@gmail.com>2018-09-17 19:56:42 +0200
committerVindaar <basti90@gmail.com>2018-09-17 19:56:42 +0200
commit72a65c43a738b7d99d8e345b169c37b3de96014d (patch)
treed473e3f056684785368032962ab0b2b76bcf6f61 /tests
parente9addb3ab2bdcc37581f1c053d9cfa62bf86d1c0 (diff)
downloadNim-72a65c43a738b7d99d8e345b169c37b3de96014d.tar.gz
add test case
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/t8925.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib/t8925.nim b/tests/stdlib/t8925.nim
new file mode 100644
index 000000000..d3dc1ea86
--- /dev/null
+++ b/tests/stdlib/t8925.nim
@@ -0,0 +1,16 @@
+discard """
+  file: "strscans.nim"
+  errormsg: "type mismatch between pattern '$i' (position: 1) and HourRange var 'hour'"
+"""
+
+import strscans
+
+type
+  HourRange = range[0..23]
+
+var
+  hour: HourRange
+  timeStr: string
+
+if scanf(timeStr, "$i", hour):
+  discard