call method

  1. @override
Object? call(
  1. InterpreterVisitor visitor,
  2. List<Object?> positionalArguments, [
  3. Map<String, Object?> namedArguments = const {},
  4. List<RuntimeType>? typeArguments,
])
override

Implementation

@override
Object? call(
  InterpreterVisitor visitor,
  List<Object?> positionalArguments, [
  Map<String, Object?> namedArguments = const {},
  List<RuntimeType>? typeArguments,
]) {
  if (typeArguments != null && typeArguments.isNotEmpty) {
    throw RuntimeD4rtException(
      'An instantiated generic function cannot take type arguments again '
      '(it is already instantiated with '
      '<${this.typeArguments.map((t) => t.name).join(', ')}>).',
    );
  }
  return target.call(
    visitor,
    positionalArguments,
    namedArguments,
    this.typeArguments,
  );
}