summary refs log tree commit diff stats
path: root/tests/stdlib/t8925.nim
blob: d3dc1ea8612c2e964f80fa23991659001355b120 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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