summary refs log tree commit diff stats
path: root/tests/range/tsubrange.nim
blob: 914e7c6e7d27b092def2b8ca5d8de11d0b30a3b3 (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) =
  discard

var
  r: TRange
  y = 50
r = y

p y

const
  myConst: TRange = 60