return _type = Type.NodeSetDTM;
return _type = Type.NodeSet;
    public Type typeCheck(SymbolTable stable) throws TypeCheckError {	Type texp = _exp.typeCheck(stable);	if (texp instanceof ReferenceType) {	    // TODO: print a warning indicating that no expansion is	    // possible in this case due to lack of type info	    throw new TypeCheckError(this);	}	if (texp instanceof NumberType) {	    if (texp instanceof IntType == false) {		_exp = new CastExpr(_exp, Type.Int);	    }	    // Expand [last()] into [position() = last()]	    if ((_exp instanceof LastCall) ||		(getParent() instanceof Pattern) ||		(getParent() instanceof FilterExpr)) {		final QName position = getParser().getQName("position");		final PositionCall positionCall;		positionCall = new PositionCall(position, -1);		positionCall.setParser(getParser());		positionCall.setParent(this);		_exp = new EqualityExpr(EqualityExpr.EQ, positionCall, _exp);		if (_exp.typeCheck(stable) != Type.Boolean) {		    _exp = new CastExpr(_exp, Type.Boolean);		}		_nthPositionFilter = false;		return _type = Type.Boolean;	    }	    // Use NthPositionIterator to handle [position()] or [a]	    else {		SyntaxTreeNode parent = getParent();		if ((parent != null) && (parent instanceof Step)) {		    parent = parent.getParent();		    if ((parent != null) &&			(parent instanceof AbsoluteLocationPath)) {			// TODO: Special case for "//*[n]" pattern....			_nthDescendant = true;			return _type = Type.NodeSetDTM;		    }		}		_nthPositionFilter = true;		return _type = Type.NodeSetDTM;	    }	}	else if (texp instanceof BooleanType == false) {	    _exp = new CastExpr(_exp, Type.Boolean);	}	_nthPositionFilter = false;	return _type = Type.Boolean;    }