langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
changeset 32709 55d136799f79
parent 31005 673532e90337
child 32915 eb290482d42f
equal deleted inserted replaced
32708:1a5b80de4f57 32709:55d136799f79
  3150         private final MapVisitor<Type> methodWithReturn = new MapVisitor<Type>() {
  3150         private final MapVisitor<Type> methodWithReturn = new MapVisitor<Type>() {
  3151             public Type visitType(Type t, Type newReturn) {
  3151             public Type visitType(Type t, Type newReturn) {
  3152                 throw new IllegalArgumentException("Not a method type: " + t);
  3152                 throw new IllegalArgumentException("Not a method type: " + t);
  3153             }
  3153             }
  3154             public Type visitMethodType(MethodType t, Type newReturn) {
  3154             public Type visitMethodType(MethodType t, Type newReturn) {
  3155                 return new MethodType(t.argtypes, newReturn, t.thrown, t.tsym);
  3155                 return new MethodType(t.argtypes, newReturn, t.thrown, t.tsym) {
       
  3156                     @Override
       
  3157                     public Type baseType() {
       
  3158                         return t;
       
  3159                     }
       
  3160                 };
  3156             }
  3161             }
  3157             public Type visitForAll(ForAll t, Type newReturn) {
  3162             public Type visitForAll(ForAll t, Type newReturn) {
  3158                 return new ForAll(t.tvars, t.qtype.accept(this, newReturn));
  3163                 return new ForAll(t.tvars, t.qtype.accept(this, newReturn)) {
       
  3164                     @Override
       
  3165                     public Type baseType() {
       
  3166                         return t;
       
  3167                     }
       
  3168                 };
  3159             }
  3169             }
  3160         };
  3170         };
  3161 
  3171 
  3162     // <editor-fold defaultstate="collapsed" desc="createErrorType">
  3172     // <editor-fold defaultstate="collapsed" desc="createErrorType">
  3163     public Type createErrorType(Type originalType) {
  3173     public Type createErrorType(Type originalType) {