Project

Profile

Help

Revision fe77a876

Added by Michael Kay about 1 year ago

Fix bug #4610

View differences:

latest10/hej/net/sf/saxon/expr/SlashExpression.java
347 347
        Optimizer opt = visitor.obtainOptimizer();
348 348

  
349 349
        getLhs().optimize(visitor, contextItemType);
350
        if (Literal.isEmptySequence(getStart())) {
351
            return Literal.makeEmptySequence();
352
        }
353

  
350 354
        ContextItemStaticInfo cit = visitor.getConfiguration().makeContextItemStaticInfo(getStart().getItemType(), false);
351 355
        cit.setContextSettingExpression(getStart());
352 356
        getRhs().optimize(visitor, cit);
353 357

  
354
        if (Literal.isEmptySequence(getStart()) || Literal.isEmptySequence(getStep())) {
358
        if (Literal.isEmptySequence(getStep())) {
355 359
            return Literal.makeEmptySequence();
356 360
        }
357 361

  

Also available in: Unified diff