src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 6
40813968849e
parent 1
9a66ca7c79fa
child 7
d472e2fbcc39
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Mar 04 12:14:13 2008 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue Mar 04 13:00:08 2008 +0000
     1.3 @@ -465,12 +465,12 @@
     1.4                  types.setBounds(a, List.of(syms.objectType));
     1.5              }
     1.6          }
     1.7 +    }
     1.8 +
     1.9 +    void attribBounds(List<JCTypeParameter> typarams, Env<AttrContext> env) {
    1.10          for (JCTypeParameter tvar : typarams)
    1.11              chk.checkNonCyclic(tvar.pos(), (TypeVar)tvar.type);
    1.12          attribStats(typarams, env);
    1.13 -    }
    1.14 -
    1.15 -    void attribBounds(List<JCTypeParameter> typarams) {
    1.16          for (JCTypeParameter typaram : typarams) {
    1.17              Type bound = typaram.type.getUpperBound();
    1.18              if (bound != null && bound.tsym instanceof ClassSymbol) {
    1.19 @@ -581,7 +581,7 @@
    1.20          try {
    1.21              chk.checkDeprecatedAnnotation(tree.pos(), m);
    1.22  
    1.23 -            attribBounds(tree.typarams);
    1.24 +            attribBounds(tree.typarams, env);
    1.25  
    1.26              // If we override any other methods, check that we do so properly.
    1.27              // JLS ???
    1.28 @@ -2687,7 +2687,7 @@
    1.29          chk.validateAnnotations(tree.mods.annotations, c);
    1.30  
    1.31          // Validate type parameters, supertype and interfaces.
    1.32 -        attribBounds(tree.typarams);
    1.33 +        attribBounds(tree.typarams, env);
    1.34          chk.validateTypeParams(tree.typarams);
    1.35          chk.validate(tree.extending);
    1.36          chk.validate(tree.implementing);

mercurial