Skip to content

STRICT

Error types are not considered equal to or subtypes of any other type.

STRICT is the default policy for the following reasons:

  1. In general, considering an error type equal to all other types is unintuitive. It essentially turns error types into dynamic Any or Nothing types (depending on the typing position). This can produce a lot of typing relationships which do not make any sense, such as Int = UnresolvedClass.

  2. It forces the user to handle error types explicitly, which reduces the risk of false positives.

  3. It is consistent with most of the behavior of the Kotlin compiler.

Properties

name

val name: String

ordinal

val ordinal: Int