src/share/classes/com/sun/tools/javac/code/Types.java

changeset 2422
4ee06c77b51b
parent 2420
1aeb322cf646
child 2428
ce1d9dd2e9eb
     1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java	Mon Jun 16 11:19:22 2014 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Tue Jun 17 16:32:18 2014 -0600
     1.3 @@ -135,7 +135,7 @@
     1.4               else
     1.5                   return wildUpperBound(w.type);
     1.6           }
     1.7 -         else return t;
     1.8 +         else return t.unannotatedType();
     1.9       }
    1.10  
    1.11       /**
    1.12 @@ -147,7 +147,7 @@
    1.13               TypeVar v = (TypeVar) t.unannotatedType();
    1.14               return v.isCaptured() ? cvarUpperBound(v.bound) : v;
    1.15           }
    1.16 -         else return t;
    1.17 +         else return t.unannotatedType();
    1.18       }
    1.19  
    1.20      /**
    1.21 @@ -156,10 +156,10 @@
    1.22       */
    1.23      public Type wildLowerBound(Type t) {
    1.24          if (t.hasTag(WILDCARD)) {
    1.25 -            WildcardType w = (WildcardType) t;
    1.26 +            WildcardType w = (WildcardType) t.unannotatedType();
    1.27              return w.isExtendsBound() ? syms.botType : wildLowerBound(w.type);
    1.28          }
    1.29 -        else return t;
    1.30 +        else return t.unannotatedType();
    1.31      }
    1.32  
    1.33      /**
    1.34 @@ -167,10 +167,11 @@
    1.35       * @param t a type
    1.36       */
    1.37      public Type cvarLowerBound(Type t) {
    1.38 -        if (t.hasTag(TYPEVAR) && ((TypeVar) t).isCaptured()) {
    1.39 -            return cvarLowerBound(t.getLowerBound());
    1.40 +        if (t.hasTag(TYPEVAR)) {
    1.41 +            TypeVar v = (TypeVar) t.unannotatedType();
    1.42 +            return v.isCaptured() ? cvarLowerBound(v.getLowerBound()) : v;
    1.43          }
    1.44 -        else return t;
    1.45 +        else return t.unannotatedType();
    1.46      }
    1.47      // </editor-fold>
    1.48  

mercurial