InstantiatedCallable class

ghissues48 (GitHub #15): a generic function, method or bridged function referenced with explicit type arguments - typeOf<List<int?>>, obj.m<int> - without being called. A call runs target with typeArguments, as typeOf<List<int?>>() would; Dart allows no further type arguments on an instantiated reference.

Two instantiations are equal when they reference the same callable with type arguments of the same names, which is what Dart's == on instantiated tear-offs compares. A reference handed to NATIVE code is converted like any callable (D4.coerceCallableToFunction) and still runs with its type arguments when called; native code cannot see them as a Dart generic instantiation.

Implemented types

Constructors

InstantiatedCallable(Callable target, List<RuntimeType> typeArguments)

Properties

arity → int
no setteroverride
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
target → Callable
The referenced callable.
final
typeArguments → List<RuntimeType>
The resolved type arguments, ? and nesting kept.
final

Methods

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.
override