summary refs log tree commit diff stats
path: root/tests/ccgbugs
diff options
context:
space:
mode:
authorAlbert Safin <xzfcpw@gmail.com>2019-08-31 09:46:13 +0000
committerAlbert Safin <xzfcpw@gmail.com>2019-08-31 10:16:26 +0000
commitefe1bed82e8fa9476b4c9ed2a85802f6fb222cc6 (patch)
treef12af830435549f9f9830aafdb672909ffb6ee9a /tests/ccgbugs
parent9ae0dd611f77c4cd7122e6ac77e0278c1bafbbd7 (diff)
downloadNim-efe1bed82e8fa9476b4c9ed2a85802f6fb222cc6.tar.gz
Allow typeof(nil) as a return type
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r--tests/ccgbugs/tnil_type.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ccgbugs/tnil_type.nim b/tests/ccgbugs/tnil_type.nim
index b57e64513..12310dae9 100644
--- a/tests/ccgbugs/tnil_type.nim
+++ b/tests/ccgbugs/tnil_type.nim
@@ -12,4 +12,7 @@ proc f3(_: typedesc) = discard
 f3(typeof(nil))
 
 proc f4[T](_: T) = discard
-f4(nil)
\ No newline at end of file
+f4(nil)
+
+proc f5(): typeof(nil) = nil
+discard f5()