src/share/classes/com/sun/tools/javac/comp/Resolve.java

changeset 156
db77bf6adb53
parent 155
4d2d8b6459e1
child 160
a23e1dc02698
equal deleted inserted replaced
155:4d2d8b6459e1 156:db77bf6adb53
648 if (m1Abstract && !m2Abstract) return m2; 648 if (m1Abstract && !m2Abstract) return m2;
649 if (m2Abstract && !m1Abstract) return m1; 649 if (m2Abstract && !m1Abstract) return m1;
650 // both abstract or both concrete 650 // both abstract or both concrete
651 if (!m1Abstract && !m2Abstract) 651 if (!m1Abstract && !m2Abstract)
652 return new AmbiguityError(m1, m2); 652 return new AmbiguityError(m1, m2);
653 // check for same erasure 653 // check that both signatures have the same erasure
654 if (!types.isSameType(m1.erasure(types), m2.erasure(types))) 654 if (!types.isSameTypes(m1.erasure(types).getParameterTypes(),
655 m2.erasure(types).getParameterTypes()))
655 return new AmbiguityError(m1, m2); 656 return new AmbiguityError(m1, m2);
656 // both abstract, neither overridden; merge throws clause and result type 657 // both abstract, neither overridden; merge throws clause and result type
657 Symbol result; 658 Symbol result;
658 Type result2 = mt2.getReturnType(); 659 Type result2 = mt2.getReturnType();
659 if (mt2.tag == FORALL) 660 if (mt2.tag == FORALL)

mercurial