call method
Object?
call(
- InterpreterVisitor visitor,
- List<
Object?> positionalArguments, [ - Map<
String, Object?> namedArguments = const {}, - List<
RuntimeType> ? typeArguments = const [],
override
Implementation
@override
Object? call(InterpreterVisitor visitor, List<Object?> positionalArguments,
[Map<String, Object?> namedArguments = const {},
List<RuntimeType>? typeArguments = const []]) {
// Prepare the arguments for the actual call to the InterpretedExtensionMethod:
// The first argument is ALWAYS the target instance.
final actualPositionalArgs = [target, ...positionalArguments];
Logger.debug(
"[BoundExtensionMethodCallable] Calling extension method '${extensionMethod.declaration.name!.name}' bound to ${target?.runtimeType}");
// Call the original extension method with the adjusted arguments.
// It will handle ReturnException, etc.
return extensionMethod.call(
visitor, actualPositionalArgs, namedArguments, typeArguments);
}