summary refs log tree commit diff stats
path: root/tests/stdlib/t8925.nim
blob: dbf55fd882b948eb355fc6ee6b99116973bd9b0a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  errormsg: "type mismatch between pattern '$i' (position: 1) and HourRange var 'hour'"
  file: "strscans.nim"
"""

import strscans

type
  HourRange = range[0..23]

var
  hour: HourRange
  timeStr: string

if scanf(timeStr, "$i", hour):
  discard