Return typeof(nil) (#12100)
* Allow typeof(nil) as a return type * $typeof(nil) is now "typeof(nil)", not "nil"
This commit is contained in:
commit
15213028b7
4 changed files with 9 additions and 3 deletions
|
|
@ -12,4 +12,7 @@ proc f3(_: typedesc) = discard
|
|||
f3(typeof(nil))
|
||||
|
||||
proc f4[T](_: T) = discard
|
||||
f4(nil)
|
||||
f4(nil)
|
||||
|
||||
proc f5(): typeof(nil) = nil
|
||||
discard f5()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue