InterpretedFunction class

Implemented types

Constructors

InterpretedFunction.constructor(ConstructorDeclaration declaration, Environment closure, RuntimeType? owner)
InterpretedFunction.declaration(FunctionDeclaration declaration, Environment closure, RuntimeType? declaredReturnType, bool isNullable)
InterpretedFunction.expression(FunctionExpression expression, Environment closure)
InterpretedFunction.method(MethodDeclaration declaration, Environment closure, RuntimeType? owner)

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
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 → ConstructorName?
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