CallResolutionResult

data class CallResolutionResult(val source: Expression, val arguments: List<Expression>, var candidateFunctions: Set<FunctionDeclaration>, var viableFunctions: Set<FunctionDeclaration>, var signatureResults: Map<FunctionDeclaration, SignatureResult>, var bestViable: Set<FunctionDeclaration>, var success: CallResolutionResult.SuccessKind, var actualStartScope: Scope?)

This is the result of SymbolResolver.resolveWithArguments. It holds all necessary intermediate results (such as candidateFunctions, viableFunctions) as well as the final result (see bestViable) of the call resolution.

Constructors

Link copied to clipboard
constructor(source: Expression, arguments: List<Expression>, candidateFunctions: Set<FunctionDeclaration>, viableFunctions: Set<FunctionDeclaration>, signatureResults: Map<FunctionDeclaration, SignatureResult>, bestViable: Set<FunctionDeclaration>, success: CallResolutionResult.SuccessKind, actualStartScope: Scope?)

Types

Link copied to clipboard

This enum holds information about the kind of success this call resolution had. For example, whether it was successful without any errors or if an ambiguous result was returned.

Properties

Link copied to clipboard

The actual start scope of the resolution, after ScopeManager.extractScope is called on the callee. This can differ from the original start scope parameter handed to SymbolResolver.resolveWithArguments if the callee contains an FQN.

Link copied to clipboard

The arguments that were supplied to the expression.

Link copied to clipboard

This set contains the best viable function(s) of the viableFunctions. Ideally this is only one, but because of ambiguities or other factors, this can contain multiple functions.

Link copied to clipboard

A set of candidate symbols we discovered based on the CallExpression.callee (using ScopeManager.lookupSymbolByName), more specifically a list of FunctionDeclaration nodes.

Link copied to clipboard
Link copied to clipboard

The original expression that triggered the resolution. Most likely a CallExpression.

Link copied to clipboard

The kind of success this resolution had.

Link copied to clipboard

A set of functions, that restrict the candidateFunctions to those whose signature match.