Symbol bestSoFar = methodNotFound;
currentResolutionContext = resolveContext;
for (MethodResolutionPhase phase : methodResolutionSteps) {
if (!phase.isApplicable(boxingEnabled, varargsEnabled) ||
lookupHelper.shouldStop(bestSoFar, phase)) break;
MethodResolutionPhase prevPhase = currentResolutionContext.step;
Symbol prevBest = bestSoFar;
currentResolutionContext.step = phase;
Symbol sym = lookupHelper.lookup(env, phase);
lookupHelper.debug(pos, sym);
bestSoFar = phase.mergeResults(bestSoFar, sym);