summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-08-31 19:24:44 +0200
committerGitHub <noreply@github.com>2019-08-31 19:24:44 +0200
commit15213028b75fc485b5fd1f4461e36a04b2f0102a (patch)
tree0e0fb5b9a800f120f44f8c11bd5981893bbc0470 /tests
parent2b565aad89587114148052eabdd430b923c21394 (diff)
parenta6428657e90d68c3993de4fa6ad05c6006378fc3 (diff)
downloadNim-15213028b75fc485b5fd1f4461e36a04b2f0102a.tar.gz
Return typeof(nil) (#12100)
* Allow typeof(nil) as a return type

* $typeof(nil) is now "typeof(nil)", not "nil"
Diffstat (limited to 'tests')
-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()