Project

Profile

Help

Revision a2490f66

Added by Michael Kay about 1 year ago

Fix bug #4765

View differences:

latest10/hej/net/sf/saxon/expr/ForExpression.java
278 278
                    // the whole if() condition has been promoted
279 279
                    Expression oldThen = ((Choose) getAction()).getAction(0);
280 280
                    setAction(oldThen);
281
                    return Choose.makeConditional(condition, this);
281
                    return Choose.makeConditional(promotedCondition, this);
282 282
                } else {
283 283
                    // one or more terms of the if() condition have been promoted
284 284
                    Expression retainedCondition = list.get(0);
latest9.9/hej/net/sf/saxon/expr/ForExpression.java
279 279
                    // the whole if() condition has been promoted
280 280
                    Expression oldThen = ((Choose) getAction()).getAction(0);
281 281
                    setAction(oldThen);
282
                    return Choose.makeConditional(condition, this);
282
                    return Choose.makeConditional(promotedCondition, this);
283 283
                } else {
284 284
                    // one or more terms of the if() condition have been promoted
285 285
                    Expression retainedCondition = list.get(0);
latest9.9/hej/net/sf/saxon/expr/flwor/OrderByClause.java
23 23
 */
24 24
public class OrderByClause extends Clause {
25 25

  
26
    public final static OperandRole SORT_KEYS_ROLE =
27
            new OperandRole(OperandRole.HIGHER_ORDER | OperandRole.CONSTRAINED_CLASS,
28
                            OperandUsage.NAVIGATION,
29
                            SequenceType.ANY_SEQUENCE,
30
                            expr -> expr instanceof SortKeyDefinitionList);
31

  
32

  
26 33
    Operand sortKeysOp; // Holds a SortKeyDefinitionList
27 34
    AtomicComparer[] comparators;
28 35
    Operand tupleOp; // Holds a TupleExpression
29 36

  
30 37
    public OrderByClause(FLWORExpression flwor, SortKeyDefinition[] sortKeys, TupleExpression tupleExpression) {
31
        this.sortKeysOp = new Operand(flwor, new SortKeyDefinitionList(sortKeys), OperandRole.REPEAT_NAVIGATE_CONSTRAINED);
38
        this.sortKeysOp = new Operand(flwor, new SortKeyDefinitionList(sortKeys), SORT_KEYS_ROLE);
32 39
        this.tupleOp = new Operand(flwor, tupleExpression, OperandRole.REPEAT_NAVIGATE_CONSTRAINED);
33 40
    }
34 41

  

Also available in: Unified diff