if (!Cardinality.allowsMany(getBaseExpression().getCardinality())) {
return getBaseExpression();
}
// In a choose expression, we can push the wrapper down to the action branches (whence it may disappear)
if (getBaseExpression() instanceof Choose) {
Choose choose = (Choose) getBaseExpression();
Expression[] actions = choose.getActions();
for (int i=0; i<actions.length; i++) {
AdjacentTextNodeMerger atm2 = new AdjacentTextNodeMerger(actions[i]);
actions[i] = atm2.typeCheck(visitor, contextItemType);
}
return choose;