ItemType supplied = operand.getItemType(th);
int relation = th.relationship(requiredItemType, supplied);
if (relation == TypeHierarchy.SAME_TYPE || relation == TypeHierarchy.SUBSUMES) {
return operand;
} else if (relation == TypeHierarchy.DISJOINT) {
final NamePool namePool = visitor.getConfiguration().getNamePool();
if (Cardinality.allowsZero(card)) {
String message = role.composeErrorMessage(
requiredItemType, operand.getItemType(th), namePool);
visitor.getStaticContext().issueWarning("The only value that can pass type-checking is an empty sequence. " +