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

                        
                                                  




                       
<
discard """
  file: "tsubrange2.nim"
  outputsub: "value out of range: 50 [RangeError]"
  exitcode: "1"
"""

type
  TRange = range[0..40]

proc p(r: TRange) =
  discard

var
  r: TRange
  y = 50
p y
"p">..'z', 'A'..'Z'})) type TObj {.pure, inheritable.} = object data: int TFoo = ref object of TObj d2: float var foo: TFoo new(foo) when false: # cannot capture this output as it contains a memory address :-/ echo foo.repr #var testseq: seq[string] = @[ # "a", "b", "c", "d", "e" #] #echo(repr(testseq))