Project

Profile

Help

Revision da4410bf

Added by Michael Kay about 7 years ago

Fix bug 2200

View differences:

latest9.5/hej/net/sf/saxon/functions/SystemFunctionCall.java
13 13
import net.sf.saxon.lib.NamespaceConstant;
14 14
import net.sf.saxon.om.*;
15 15
import net.sf.saxon.trans.XPathException;
16
import net.sf.saxon.type.AnyItemType;
17
import net.sf.saxon.type.FunctionItemType;
18
import net.sf.saxon.type.ItemType;
19
import net.sf.saxon.type.TypeHierarchy;
16
import net.sf.saxon.type.*;
20 17
import net.sf.saxon.value.Cardinality;
21 18
import net.sf.saxon.value.SequenceType;
22 19

  
......
330 327
            }
331 328
        } else if ((details.properties & StandardFunction.AS_PRIM_ARG0) != 0) {
332 329
            if (argument.length > 0) {
333
                return argument[0].getItemType(th).getPrimitiveItemType();
330
                ItemType t0 = argument[0].getItemType(th).getPrimitiveItemType();
331
                return t0 instanceof AtomicType ? t0 : type;  // bug 2200
334 332
            } else {
335 333
                return AnyItemType.getInstance();
336 334
                // if there is no first argument, an error will be reported

Also available in: Unified diff