// second part of return value is whether primitive widening is required static Pair findMethod_withPrimitiveWidening_onTypes(O o, S method, Class... argTypes) ctex { new Lowest best; bool widening; if (o cast Class) { _MethodCache cache = callOpt_getCache(o); L methods = cache.cache.get(method); if (methods != null) for (Method m : methods) { continue unless isStaticMethod(m); int score = methodApplicabilityScore_withPrimitiveWidening_onTypes(m, argTypes); print ifdef preciseCall_debug("Method score: " + m + " " + score); if (abs(score) < Int.MAX_VALUE) { best.put(m, abs(score)); widening = score < 0; } } ret pair(best!, widening); } if (o == null) null; _MethodCache cache = callOpt_getCache(o.getClass()); L methods = cache.cache.get(method); if (methods != null) for (Method m : methods) { int score = methodApplicabilityScore_withPrimitiveWidening_onTypes(m, argTypes); if (abs(score) < Int.MAX_VALUE) { best.put(m, abs(score)); widening = score < 0; } } ret pair(best!, widening); }