ToolError.reportError(ErrorMessage.TYPE_NOT_DECLARED, this, this.implementsName);
}
// since there is a valid implements, check that all methods are indeed present
ClassType currentCT = (ClassType) this.nameBinding.getType();
TypeType implementsTT = (TypeType)nameImplements.getType();
if (!getEquivalentType().subtype(implementsTT)) {
ToolError.reportError(ErrorMessage.NOT_SUBTYPE,
this,
this.nameBinding.getName(),
nameImplements.getName());
}
}
if (!this.implementsClassName.equals("")) {
NameBinding nameImplementsClass = env.lookup(this.implementsClassName);
if (nameImplementsClass == null) {
ToolError.reportError(ErrorMessage.TYPE_NOT_DECLARED, this, this.implementsClassName);
}
// since there is a valid class implements, check that all methods are indeed present
ClassType currentCT = (ClassType) this.nameBinding.getType();
TypeType implementsCT = (TypeType) (
((ClassType)nameImplementsClass.getType())
.getEnv()
.lookupBinding("type", TypeDeclBinding.class)).get().getType();
if (!getEquivalentClassType().subtype(implementsCT)) {