santiagopg    2002/06/20 15:23:41

  Modified:    java/src/org/apache/xalan/xsltc/compiler NameBase.java
  Log:
  _type renamed to _paramType to avoid shadowing of protected vars.
  
  Revision  Changes    Path
  1.7       +11 -12    
xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameBase.java
  
  Index: NameBase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/compiler/NameBase.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- NameBase.java     1 Feb 2002 20:07:08 -0000       1.6
  +++ NameBase.java     20 Jun 2002 22:23:41 -0000      1.7
  @@ -72,7 +72,7 @@
   class NameBase extends FunctionCall {
   
       private Expression _param = null;
  -    private Type       _type = Type.Node;
  +    private Type       _paramType = Type.Node;
   
       /**
        * Handles calls with no parameter (current node is implicit parameter).
  @@ -99,30 +99,29 @@
        // Check the argument type (if any)
        switch(argumentCount()) {
        case 0:
  -         _type = Type.Node;
  +         _paramType = Type.Node;
            break;
        case 1:
  -         _type = _param.typeCheck(stable);
  +         _paramType = _param.typeCheck(stable);
            break;
        default:
            throw new TypeCheckError(this);
        }
   
        // The argument has to be a node, a node-set or a node reference
  -     if ((_type != Type.NodeSet) &&
  -         (_type != Type.Node) &&
  -         (_type != Type.Reference)) {
  +     if ((_paramType != Type.NodeSet) &&
  +         (_paramType != Type.Node) &&
  +         (_paramType != Type.Reference)) {
            throw new TypeCheckError(this);
        }
   
  -     return Type.String;
  +     return (_type = Type.String);
       }
   
       public Type getType() {
  -     return Type.String;
  +     return _type;
       }
   
  -
       /**
        * Translate the code required for getting the node for which the
        * QName, local-name or namespace URI should be extracted.
  @@ -139,10 +138,10 @@
            il.append(methodGen.loadContextNode());
        }
        // Function was called with node parameter
  -     else if (_type == Type.Node) {
  +     else if (_paramType == Type.Node) {
            _param.translate(classGen, methodGen);
        }
  -     else if (_type == Type.Reference) {
  +     else if (_paramType == Type.Reference) {
            _param.translate(classGen, methodGen);
            il.append(new INVOKESTATIC(cpg.addMethodref
                                       (BASIS_LIBRARY_CLASS,
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to