summary refs log blame commit diff stats
path: root/tests/range/tsubrange.nim
blob: f778c55ebaa29191bed043e102e39ac50027b84f (plain) (tree)
1
2
3
4
5
6
7
8
9
           
                                         
          



                       
 
                   
         
 








                      
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