813 throw new AssertionError(); |
813 throw new AssertionError(); |
814 } |
814 } |
815 } |
815 } |
816 //where |
816 //where |
817 private boolean signatureMoreSpecific(Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) { |
817 private boolean signatureMoreSpecific(Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) { |
|
818 noteWarner.clear(); |
818 Type mtype1 = types.memberType(site, adjustVarargs(m1, m2, useVarargs)); |
819 Type mtype1 = types.memberType(site, adjustVarargs(m1, m2, useVarargs)); |
819 noteWarner.unchecked = false; |
|
820 return (instantiate(env, site, adjustVarargs(m2, m1, useVarargs), types.lowerBoundArgtypes(mtype1), null, |
820 return (instantiate(env, site, adjustVarargs(m2, m1, useVarargs), types.lowerBoundArgtypes(mtype1), null, |
821 allowBoxing, false, noteWarner) != null || |
821 allowBoxing, false, noteWarner) != null || |
822 useVarargs && instantiate(env, site, adjustVarargs(m2, m1, useVarargs), types.lowerBoundArgtypes(mtype1), null, |
822 useVarargs && instantiate(env, site, adjustVarargs(m2, m1, useVarargs), types.lowerBoundArgtypes(mtype1), null, |
823 allowBoxing, true, noteWarner) != null) && |
823 allowBoxing, true, noteWarner) != null) && |
824 !noteWarner.unchecked; |
824 !noteWarner.hasLint(Lint.LintCategory.UNCHECKED); |
825 } |
825 } |
826 //where |
826 //where |
827 private Symbol adjustVarargs(Symbol to, Symbol from, boolean useVarargs) { |
827 private Symbol adjustVarargs(Symbol to, Symbol from, boolean useVarargs) { |
828 List<Type> fromArgs = from.type.getParameterTypes(); |
828 List<Type> fromArgs = from.type.getParameterTypes(); |
829 List<Type> toArgs = to.type.getParameterTypes(); |
829 List<Type> toArgs = to.type.getParameterTypes(); |