protocol ExpressibleByNilLiteral
Inheritance | View Protocol Hierarchy → |
---|---|
Import | import Swift |
Initializers
init(nilLiteral:) Required
Creates an instance initialized with nil
.
Declaration
init(nilLiteral: ())
A type that can be initialized using the nil literal,
nil
.nil
has a specific meaning in Swift---the absence of a value. Only theOptional
type conforms toExpressibleByNilLiteral
.ExpressibleByNilLiteral
conformance for types that usenil
for other purposes is discouraged.