} else if (declarationClass == ceylon.language.meta.declaration.AliasDeclaration.class) {
return DECLARATION_IS_ALIAS;
} else if (declarationClass == ceylon.language.meta.declaration.NestableDeclaration.class) {
return true_();
}
throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive");
} else if (kind instanceof TypeDescriptor.Union) {
TypeDescriptor[] members = ((TypeDescriptor.Union)kind).getMembers();
@SuppressWarnings("unchecked")
Predicate<Declaration>[] preds = new Predicate[members.length];
int ii = 0;
for (TypeDescriptor member : members) {
preds[ii++] = isDeclarationOfKind(member);
}
return or(preds);
} else if (kind instanceof TypeDescriptor.Intersection) {
TypeDescriptor[] members = ((TypeDescriptor.Intersection)kind).getMembers();
@SuppressWarnings("unchecked")
Predicate<Declaration>[] preds = new Predicate[members.length];
int ii = 0;
for (TypeDescriptor member : members) {
preds[ii++] = isDeclarationOfKind(member);
}
return and(preds);
} else if (kind == TypeDescriptor.NothingType) {
return false_();
}
throw new EnumeratedTypeError("Supposedly exhaustive switch was not exhaustive");
}