summary refs log tree commit diff stats
path: root/tests/range/tsubrange.nim
blob: 6f88c5a2247cf9bc25b1b48ac809ea4667147504 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
discard """
  line: 20
  errormsg: "cannot convert 60 to TRange"
"""

type
  TRange = range[0..40]

proc p(r: TRange) =
  nil

var
  r: TRange
  y = 50
r = y

p y

const
  myConst: TRange = 60