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

Print this page

        

@@ -2432,11 +2432,11 @@
 
         Types.MapVisitor<DiagnosticPosition> targetChecker = new Types.MapVisitor<DiagnosticPosition>() {
 
             @Override
             public Type visitClassType(ClassType t, DiagnosticPosition pos) {
-                return t.isCompound() ?
+                return t.isIntersection() ?
                         visitIntersectionClassType((IntersectionClassType)t, pos) : t;
             }
 
             public Type visitIntersectionClassType(IntersectionClassType ict, DiagnosticPosition pos) {
                 Symbol desc = types.findDescriptorSymbol(makeNotionalInterface(ict));

@@ -2463,12 +2463,11 @@
                     if (i.isParameterized()) {
                         targs.appendList(i.tsym.type.allparams());
                     }
                     supertypes.append(i.tsym.type);
                 }
-                IntersectionClassType notionalIntf =
-                        (IntersectionClassType)types.makeCompoundType(supertypes.toList());
+                IntersectionClassType notionalIntf = types.makeIntersectionType(supertypes.toList());
                 notionalIntf.allparams_field = targs.toList();
                 notionalIntf.tsym.flags_field |= INTERFACE;
                 return notionalIntf.tsym;
             }
 

@@ -4030,11 +4029,11 @@
         if (bounds.length() == 0) {
             return syms.objectType;
         } else if (bounds.length() == 1) {
             return bounds.head.type;
         } else {
-            Type owntype = types.makeCompoundType(TreeInfo.types(bounds));
+            Type owntype = types.makeIntersectionType(TreeInfo.types(bounds));
             // ... the variable's bound is a class type flagged COMPOUND
             // (see comment for TypeVar.bound).
             // In this case, generate a class tree that represents the
             // bound class, ...
             JCExpression extending;