Project

Profile

Help

Revision ca97679f

Added by Michael Kay over 12 years ago

2788064 - Compile time ClassCastException at LetExpression.java:517

View differences:

latest9.1/bj/net/sf/saxon/expr/LetExpression.java
514 514
            replaceVariable(opt, seq);
515 515
        }
516 516
        if (isIndexedVariable()) {
517
            Binding newBinding = ((VariableReference) seq).getBinding();
518
            if (newBinding instanceof LetExpression) {
519
                ((LetExpression) newBinding).setIndexedVariable();
517
            if (seq instanceof VariableReference) {
518
                Binding newBinding = ((VariableReference) seq).getBinding();
519
                if (newBinding instanceof LetExpression) {
520
                    ((LetExpression) newBinding).setIndexedVariable();
521
                }
522
            } else {
523
                // can happen as a result of other rewrites
524
                refCount = 10;
520 525
            }
521 526
        }
522 527
    }

Also available in: Unified diff