summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-18 09:37:39 +0200
committerGitHub <noreply@github.com>2018-09-18 09:37:39 +0200
commit597acad507f1acc8a50e9e98d83328a4c4dd8bda (patch)
tree4f8a554bd4d26e42788374fdc314930bc01c2983 /tests
parentc661f8e1be24a4d3d4b9cf8a544e2a3cdca87593 (diff)
parent72a65c43a738b7d99d8e345b169c37b3de96014d (diff)
downloadNim-597acad507f1acc8a50e9e98d83328a4c4dd8bda.tar.gz
Merge pull request #8937 from Vindaar/fixes-8925
fix #8925 by using `getTypeInst` instead of `getType`
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