From 72a65c43a738b7d99d8e345b169c37b3de96014d Mon Sep 17 00:00:00 2001 From: Vindaar Date: Mon, 17 Sep 2018 19:56:42 +0200 Subject: add test case --- tests/stdlib/t8925.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/stdlib/t8925.nim (limited to 'tests') 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 -- cgit 1.4.1-2-gfad0