OptionalTypeOperator

public type OptionalTypeOperator[T] = Optional[T]

Compiler hook — T? desugars to Optional[T] via this alias. End users should write the sugar; this declaration exists so the operator can resolve to a concrete type.

Examples

var name: String? = null; // same as Optional[String] func find(id: Int64) -> User?; // returns Optional[User] let nested: Int64?? = null; // Optional[Optional[Int64]]

Defined in lang/std/result/optional.ks