This bug affects applications using Saxon's XPath API only.
Saxon fails with a ClassCastException when using the
evaluate() method of the XPathEvaluator class. The
particular circumstance was a filter expression that
compared [@att=$var], but it could happen with any
expression, because the code for type checking and type
conversion (including atomization) is not being added
to the raw compiled expression.
exp = xpp.createExpression("....");
result = exp.evaluate();
Source code fixed. Add the following to
XPathEvaluator#evaluate() (line 212)
exp = exp.typeCheck(staticContext);
Affects Saxon 7.x only.
Test case: users\filer\Tree.java