* @link http://www.w3.org/TR/xquery-semantics/#jd_quantifier
*/
public static Type quantify(final Type expected, final Type actual) {
if(expected instanceof AtomicType) {
if(actual instanceof SequenceType) {
SequenceType seq = (SequenceType) actual;
if(seq.quantifier() == Occurrence.OCC_EXACTLY_ONE) {
return expected;
} else {
return new SequenceType((AtomicType) expected, seq.quantifier());
}
} else {
return expected;
}
} else {