From 06feaef64a2bb4fbff50091b2f15cb0736c849d3 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 11 Apr 2015 02:54:20 +0200 Subject: fixes #1658 --- tests/objects/tobjloop.nim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/objects/tobjloop.nim (limited to 'tests/objects') diff --git a/tests/objects/tobjloop.nim b/tests/objects/tobjloop.nim new file mode 100644 index 000000000..9fea1e2fb --- /dev/null +++ b/tests/objects/tobjloop.nim @@ -0,0 +1,15 @@ +discard """ + output: "is Nil false" +""" +# bug #1658 + +type + Loop* = ref object + onBeforeSelect*: proc (L: Loop) + +var L: Loop +new L +L.onBeforeSelect = proc (bar: Loop) = + echo "is Nil ", bar.isNil + +L.onBeforeSelect(L) -- cgit 1.4.1-2-gfad0