A compiled SEF package containing a CoercedFunction cannot be loaded by Saxon-PE
A compiled SEF package containing a CoercedFunction cannot be loaded by Saxon-PE. This dates back to when Saxon-HE didn't support higher-order functions.
#1 Updated by Michael Kay 11 months ago
- Status changed from New to In Progress
I transferred the code handling coercedFn from PackageLoaderPE to PackageLoaderHE, but it fails with an AssertionError because the function being coerced is a map.
Fixed this by changing the test (still in PackageLoaderHE/"coercedFn") from
target instanceof FunctionLiteral to
target instanceof Literal.
It now gets further, but fails later on saying
The items on the LHS of the '?' operator must be maps or arrays; but value (coerced map) was supplied. This is a user error; and it turns out that the original failure was triggered by the same user error, but I'm pretty sure it could also be triggered by correct code.
#2 Updated by Michael Kay 11 months ago
I'm confident that moving the existing code into Saxon-HE is the right solution, it's been tested in an ad-hoc way on the development branch, and I shall make the same fix on the 10.0 branch. The conditions that led to it are not easy to reproduce in a simple test case.
Please register to edit this issue