LeafLookupTree

class LeafLookupTree<Element : A_BasicObject, Result : A_BasicObject> : LookupTree<Element, Result>

A LookupTree representing a solution.

Author

Mark van Gulik

Parameters

Element

The kind of elements in the lookup tree, such as method definitions.

Result

What we expect to produce from a lookup activity, such as the tuple of most-specific matching method definitions for some arguments.

finalResult

The most specific definitions for the provided arguments. Thus, if this is empty, there are no applicable definitions, and if there's more than one element the actual call is ambiguous.

Functions

Link copied to clipboard
fun castForGenerator(): LookupTree<A_Definition, A_Tuple>

Strengthen the type to a lookup tree suitable for method lookups.

Link copied to clipboard
open override fun <AdaptorMemento> expandIfNecessary(    signatureExtrasExtractor: (Element) -> Pair<A_Type?, List<A_Type>>,     adaptor: LookupTreeAdaptor<Element, Result, AdaptorMemento>,     numNaturalArgs: Int,     memento: AdaptorMemento): DecisionStep<Element, Result>

If it has not already been computed, compute and cache the DecisionStep to use for making progress at this InternalLookupTree. Fail if this is not an InternalLookupTree.

Link copied to clipboard
open override fun toString(): String

open override fun toString(indent: Int): String

Describe this LookupTree at a given indent level.

Properties

Link copied to clipboard
open override val solutionOrNull: Result

Answer the lookup solution (List of A_Definition at this leaf node, or null if this is not a leaf node.