500 public void visitVarDef(JCVariableDecl that) { |
500 public void visitVarDef(JCVariableDecl that) { |
501 if (that.sym == sym) result = that; |
501 if (that.sym == sym) result = that; |
502 else super.visitVarDef(that); |
502 else super.visitVarDef(that); |
503 } |
503 } |
504 public void visitTypeParameter(JCTypeParameter that) { |
504 public void visitTypeParameter(JCTypeParameter that) { |
505 if (that.type.tsym == sym) result = that; |
505 if (that.type != null && that.type.tsym == sym) result = that; |
506 else super.visitTypeParameter(that); |
506 else super.visitTypeParameter(that); |
507 } |
507 } |
508 } |
508 } |
509 DeclScanner s = new DeclScanner(); |
509 DeclScanner s = new DeclScanner(); |
510 tree.accept(s); |
510 tree.accept(s); |