mte.setEllipsis(hasSpreadArgument(args));
}
}
private void checkSuperInvocation(Tree.MemberOrTypeExpression qmte) {
Declaration member = qmte.getDeclaration();
if (member!=null) {
if (member.isFormal() && !inExtendsClause) {
qmte.addError("supertype member is declared formal: '" + member.getName() +
"' of '" + ((TypeDeclaration) member.getContainer()).getName() + "'");
}
else {
ClassOrInterface ci = getContainingClassOrInterface(qmte.getScope());
if (ci!=null) {
Declaration etm = ci.getExtendedTypeDeclaration()
.getMember(member.getName(), null, false);
if (etm!=null && !etm.equals(member) && etm.refines(member)) {
qmte.addError("inherited member is refined by intervening superclass: '" +
((TypeDeclaration) etm.getContainer()).getName() +
"' refines '" + member.getName() + "' declared by '" +
((TypeDeclaration) member.getContainer()).getName() + "'");
}
for (TypeDeclaration td: ci.getSatisfiedTypeDeclarations()) {
Declaration stm = td.getMember(member.getName(), null, false);
if (stm!=null && !stm.equals(member) && stm.refines(member)) {
qmte.addError("inherited member is refined by intervening superinterface: '" +
((TypeDeclaration) stm.getContainer()).getName() +
"' refines '" + member.getName() + "' declared by '" +
((TypeDeclaration) member.getContainer()).getName() + "'");
}
}
}