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

type
  TRange = range[0..40]

proc p(r: TRange) =
  discard

var
  r: TRange
  y = 50
r = y

p y

const
  myConst: TRange = 60