Initializer

init(nilLiteral:)

Creates an instance initialized with nil.

Declaration

init(nilLiteral: ())

Discussion

Do not call this initializer directly. It is used by the compiler when you initialize an Optional instance with a nil literal. For example:

var i: Index? = nil

In this example, the assignment to the i variable calls this initializer behind the scenes.

Relationships

See Also

Creating a Nil Value

case none

The absence of a value.