private boolean signatureMoreSpecific(List<Type> actuals, Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) { noteWarner.clear(); int maxLength = Math.max( Math.max(m1.type.getParameterTypes().length(), actuals.length()), m2.type.getParameterTypes().length()); MethodResolutionContext prevResolutionContext = currentResolutionContext; try { currentResolutionContext = new MethodResolutionContext(); currentResolutionContext.step = prevResolutionContext.step; currentResolutionContext.methodCheck = prevResolutionContext.methodCheck.mostSpecificCheck(actuals, !allowBoxing); Type mst = instantiate(env, site, m2, null, adjustArgs(types.cvarLowerBounds(types.memberType(site, m1).getParameterTypes()), m1, maxLength, useVarargs), null, allowBoxing, useVarargs, noteWarner); return mst != null && !noteWarner.hasLint(Lint.LintCategory.UNCHECKED); } finally { currentResolutionContext = prevResolutionContext; } }
private boolean signatureMoreSpecific(List<Type> actuals, Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) { noteWarner.clear(); int maxLength = Math.max( Math.max(m1.type.getParameterTypes().length(), actuals.length()), m2.type.getParameterTypes().length()); MethodResolutionContext prevResolutionContext = currentResolutionContext; try { currentResolutionContext = new MethodResolutionContext(); currentResolutionContext.step = prevResolutionContext.step; currentResolutionContext.methodCheck = prevResolutionContext.methodCheck.mostSpecificCheck(actuals, !allowBoxing); Type mst = instantiate(env, site, m2, null, adjustArgs(types.lowerBounds(types.memberType(site, m1).getParameterTypes()), m1, maxLength, useVarargs), null, allowBoxing, useVarargs, noteWarner); return mst != null && !noteWarner.hasLint(Lint.LintCategory.UNCHECKED); } finally { currentResolutionContext = prevResolutionContext; } }
noteWarner.unchecked = false; boolean m1SignatureMoreSpecific = (instantiate(env, site, m2, types.lowerBoundArgtypes(mt1), null, allowBoxing, false, noteWarner) != null || useVarargs && instantiate(env, site, m2, types.lowerBoundArgtypes(mt1), null, allowBoxing, true, noteWarner) != null) && !noteWarner.unchecked; noteWarner.unchecked = false; boolean m2SignatureMoreSpecific = (instantiate(env, site, m1, types.lowerBoundArgtypes(mt2), null, allowBoxing, false, noteWarner) != null || useVarargs && instantiate(env, site, m1, types.lowerBoundArgtypes(mt2), null, allowBoxing, true, noteWarner) != null) && !noteWarner.unchecked;
noteWarner.unchecked = false; boolean m1SignatureMoreSpecific = (instantiate(env, site, m2, types.lowerBoundArgtypes(mt1), null, allowBoxing, false, noteWarner) != null || useVarargs && instantiate(env, site, m2, types.lowerBoundArgtypes(mt1), null, allowBoxing, true, noteWarner) != null) && !noteWarner.unchecked; noteWarner.unchecked = false; boolean m2SignatureMoreSpecific = (instantiate(env, site, m1, types.lowerBoundArgtypes(mt2), null, allowBoxing, false, noteWarner) != null || useVarargs && instantiate(env, site, m1, types.lowerBoundArgtypes(mt2), null, allowBoxing, true, noteWarner) != null) && !noteWarner.unchecked;
Type owntype = rs.instantiate(env, site, sym,
Type owntype = rs.instantiate(env, site, sym,