CastResult

sealed class CastResult

CastResult is the result of the function Language.tryCast and describes whether a cast of one type into another is successful according to the logic of the Language.

Inheritors

Properties

Link copied to clipboard
open var depthDistance: Int

The "distance" from the base type to the target type that is needed when this object needs to be cast. For example, if the types are the same, the distance is 0. An implicit cast is 1. The distance from a derived class to its direct super class is also 1. It increments for each super class in the hierarchy.