InterpretedFunction class

Implemented types

Properties

arity → int
no setteroverride
callableRuntimeType → RuntimeType
DFUB5: the structural function type of this callable, used by is/as and return-type checks against T Function(...) annotations.
no setter
canCallWithoutArgs → bool
GEN-095 (D8f): true when the function can be called with no arguments, i.e. it has no required positional parameters and no required-named parameters. Used by the binary-expression visitor to decide whether to auto-invoke a function value (legitimate for zero-arg thunks, wrong for any callback that takes arguments — see semantics_gesture_delegate_test where onHorizontalDrag == null was crashing because the comparison auto-invoked the (DragUpdateDetails d) {} callback with []).
no setter
closure → Environment
no setter
declaredReturnType → RuntimeType?
final
declaredReturnTypeApplied → AppliedRuntimeType?
DFUB6: the declared return type with its applied type arguments preserved (e.g. Box<int> / List<String>), when the return type is a generic SNamedType. Null for raw / unresolvable / non-generic return types. SAstNode has no parent references, so the applied return type must be captured here at declaration time — the return statement cannot walk up the AST to re-read the annotation. Used by visitReturnStatement._checkAppliedGenericReturn.
final
hashCode → int
The hash code for this object.
no setterinherited
isAbstract → bool
final
isAsync → bool
final
isAsyncGenerator → bool
final
isFactory → bool
final
isGenerator → bool
final
isGetter → bool
final
isInitializer → bool
final
isNullable → bool
final
isSetter → bool
final
maxPositionalArity → int
The number of positional parameters this function can accept — required and optional together.
no setter
namedParameterNames → List<String>
Get all named parameter names.
no setter
ownerType → RuntimeType?
final
positionalParameterNames → List<String>
Get all positional parameter names (required and optional).
no setter
redirectedFactoryTarget → SConstructorName?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
typeParameterBounds → Map<String, RuntimeType?>
final
typeParameterNames → List<String>
final

Methods

bind(RuntimeValue instance) → Callable
Binds 'this' to a specific instance, returning a new callable where the closure has 'this' defined.
call(InterpreterVisitor visitor, List<Object?> positionalArguments, [Map<String, Object?> namedArguments = const {}, List<RuntimeType>? typeArguments]) → Object?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

clearParentMap() → void
Clear the parent map. Should be called at the start of each top-level execution to prevent unbounded growth across multiple executions.