mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Move nil/_Nil into the core library and add UnsafePointer<T> support.
Fixes <rdar://problem/15933510>. Swift SVN r13094
This commit is contained in:
12
stdlib/core/Nil.swift
Normal file
12
stdlib/core/Nil.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
@asmname="swift_makeUnsafeNil" func _makeUnsafeNil() -> AnyObject
|
||||
|
||||
struct _Nil {
|
||||
@conversion func __conversion() -> AnyObject {
|
||||
return _makeUnsafeNil()
|
||||
}
|
||||
}
|
||||
|
||||
/// A null pointer constant.
|
||||
var nil : _Nil {
|
||||
return _Nil()
|
||||
}
|
||||
Reference in New Issue
Block a user