HasType

interface HasType

Types

Link copied to clipboard

The Typeresolver needs to be aware of all outgoing edges to types in order to merge equal types to the same node. For the primary type edge, this is achieved through the hasType interface. If a node has additional type edges (e.g. default type in [ ]) the node must implement the updateType method, so that the current type is always replaced with the merged one

Link copied to clipboard
interface TypeListener

Functions

Link copied to clipboard
abstract fun refreshType()
Link copied to clipboard
Link copied to clipboard
abstract fun resetTypes(type: Type)

Used to set the type and clear the possible subtypes list for when a type is more precise than the current.

Link copied to clipboard
abstract fun setPossibleSubTypes(possibleSubTypes: List<Type>, root: MutableList<HasType>)

Set the node's possible subtypes. Listener circle detection works the same way as with .setType

Link copied to clipboard
abstract fun setType(type: Type, root: MutableList<HasType>?)

Set the node's type. This may start a chain of type listener notifications

Link copied to clipboard
Link copied to clipboard
abstract fun updatePossibleSubtypes(types: List<Type>)
Link copied to clipboard
abstract fun updateType(type: Type)

Side-effect free type modification WARNING: This should only be used by the TypeSystem Pass

Properties

Link copied to clipboard
abstract var possibleSubTypes: List<Type>
Link copied to clipboard
abstract val propagationType: Type
Link copied to clipboard
abstract var type: Type
Link copied to clipboard

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard