summary refs log blame commit diff stats
path: root/tests/notnil/tnotnil4.nim
blob: 23968ee48835db27771657d0bb40c92f7c156b70 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                             
discard ""
type
   TObj = ref object

proc check(a: TObj not nil) =
  echo repr(a)

proc doit() =
   var x : array[0..1, TObj]

   if x[0] != nil:
      check(x[0])

doit()