Project

Profile

Help

Bug #5590

closed

ClassCastException (variable declaration with context item reference)

Added by Christian Grün almost 2 years ago. Updated almost 2 years ago.

Status:
Duplicate
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-07-05
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

declare context item := 'x';
declare variable $a := .;
1[$a]

… ends up in a Java exception:

java.lang.ClassCastException: class net.sf.saxon.value.StringValue cannot be cast to class net.sf.saxon.value.NumericValue (net.sf.saxon.value.StringValue and net.sf.saxon.value.NumericValue are in unnamed module of loader 'app')
        at net.sf.saxon.expr.SubscriptExpression.evaluateItem(SubscriptExpression.java:151)
        at net.sf.saxon.expr.Expression.process(Expression.java:940)
        at com.saxonica.ee.bytecode.ByteCodeCandidate.process(ByteCodeCandidate.java:146)
        ...

Related issues

Is duplicate of Saxon - Bug #4508: ClassCastException on Saxon 10ClosedMichael Kay2020-03-30

Actions

Please register to edit this issue

Also available in: Atom PDF