layout | title |
---|---|
doc-page |
Explicit Nulls |
The "explicit nulls" feature (enabled via a flag) changes the Scala type hierarchy
so that reference types (e.g. String
) are non-nullable. We can still express nullability
with union types: e.g. val x: String|Null = null
.
The implementation of the feature in dotty can be conceptually divided in several parts: