findReachableMethodAdapter method

BridgedMethodAdapter? findReachableMethodAdapter(
  1. String memberName,
  2. InterpreterVisitor? visitor
)

findInstanceMethodAdapter as a subclass of this bridge sees it: this bridge's own adapter, else that of the first registered supertype bridge, in transitiveSupertypeNames order, that declares memberName.

A bridge carries only the members its class DECLARES, so the ListQueue bridge has no elementAt. A bare ListQueue instance reaches Iterable.elementAt through the visitor's supertype walk; an interpreted class MyQ extends ListQueue needs the same walk, or every member the bridged superclass inherits is absent from this, bare and super. access alike. Supertype names resolve in visitor's environment; with no visitor only this bridge's own adapter is found.

Implementation

BridgedMethodAdapter? findReachableMethodAdapter(
  String memberName,
  InterpreterVisitor? visitor,
) => _findReachable(visitor, (b) => b.findInstanceMethodAdapter(memberName));