ProtocolSwift5.9.0
ExpressibleByNilLiteral
A type that can be initialized using the nil literal, nil
.
protocol ExpressibleByNilLiteral
nil
has a specific meaning in Swift—the absence of a value. Only the Optional
type conforms to ExpressibleByNilLiteral
. ExpressibleByNilLiteral
conformance for types that use nil
for other purposes is discouraged.
Requirements
init(nilLiteral: ()
) Creates an instance initialized with
nil
.