TOP

TOP(null, TypeTag.TOP_TYPE_TAG, TypeTag.TOP_TAG)

The most general type of the type lattice, also written ⊤ and pronounced "top". All types are subtypes of this, and all objects are instances of it. However, this top type has an additional role: No variable or argument may be of this type, so the only thing that can be done with the result of a function call of type ⊤ is to implicitly discard it. This is a precise way of making the traditional distinction between functions and procedures. In fact, Avail requires all statements except the last one in a block to be of type ⊤, to ensure that functions are not accidentally used as procedures – and to ensure that the reader of the code knows it.

Properties

Link copied to clipboard
val instanceTag: TypeTag
Link copied to clipboard
val intersectionTypes: Array<A_Type?>

An array of A_Types, where the entries correspond to ordinals of other Types, and hold the intersection of that type and the current type.

Link copied to clipboard
val name: String
Link copied to clipboard
lateinit val o: AvailObject

Create the A_Type associated with this Types entry.

Link copied to clipboard
val ordinal: Int
Link copied to clipboard
val parent: PrimitiveTypeDescriptor.Types?
Link copied to clipboard
val superTests: BooleanArray

A boolean array where the entries correspond to ordinals of other Types. They are true precisely when the type with that ordinal is a supertype of the current type.

Link copied to clipboard
val typeTag: TypeTag
Link copied to clipboard
val unionTypes: Array<A_Type?>

An array of A_Types, where the entries correspond to ordinals of other Types, and hold the unions of that type and the current type.