diff options
Diffstat (limited to 'tests/notnil/tnotnil4.nim')
-rw-r--r-- | tests/notnil/tnotnil4.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/notnil/tnotnil4.nim b/tests/notnil/tnotnil4.nim new file mode 100644 index 000000000..23968ee48 --- /dev/null +++ b/tests/notnil/tnotnil4.nim @@ -0,0 +1,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() \ No newline at end of file |