protocol NilLiteralConvertible

A type that can be initialized using the nil literal, nil.

nil has a specific meaning in Swift---the absence of a value. Only the Optional type conforms to NilLiteralConvertible. NilLiteralConvertible conformance for types that use nil for other purposes is discouraged.

See Also: Optional

Inheritance View Protocol Hierarchy →
Import import Swift


init(nilLiteral:) Required

Creates an instance initialized with nil.


init(nilLiteral: ())