getForInvocation method

Object? getForInvocation(
  1. String name, {
  2. required InterpreterVisitor visitor,
})

get for the callee of a method invocation x.name(...).

Resolves exactly what get resolves, with visitor supplied so the bridged-superclass lookup can walk the bridge's registered supertypes (SCF19). The one difference is a miss: get answers a missing name by calling noSuchMethod with a GETTER Invocation, which is right for a property read and wrong here — a call x.name(a) must reach noSuchMethod as Invocation.method with its arguments, and the invocation site builds that itself. So a miss throws, as get does without a visitor.

Implementation

Object? getForInvocation(
  String name, {
  required InterpreterVisitor visitor,
}) => _get(name, visitor, answerMissWithNoSuchMethod: false);