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

Print this page

        

*** 2432,2442 **** Types.MapVisitor<DiagnosticPosition> targetChecker = new Types.MapVisitor<DiagnosticPosition>() { @Override public Type visitClassType(ClassType t, DiagnosticPosition pos) { ! return t.isCompound() ? visitIntersectionClassType((IntersectionClassType)t, pos) : t; } public Type visitIntersectionClassType(IntersectionClassType ict, DiagnosticPosition pos) { Symbol desc = types.findDescriptorSymbol(makeNotionalInterface(ict)); --- 2432,2442 ---- Types.MapVisitor<DiagnosticPosition> targetChecker = new Types.MapVisitor<DiagnosticPosition>() { @Override public Type visitClassType(ClassType t, DiagnosticPosition pos) { ! return t.isIntersection() ? visitIntersectionClassType((IntersectionClassType)t, pos) : t; } public Type visitIntersectionClassType(IntersectionClassType ict, DiagnosticPosition pos) { Symbol desc = types.findDescriptorSymbol(makeNotionalInterface(ict));
*** 2463,2474 **** if (i.isParameterized()) { targs.appendList(i.tsym.type.allparams()); } supertypes.append(i.tsym.type); } ! IntersectionClassType notionalIntf = ! (IntersectionClassType)types.makeCompoundType(supertypes.toList()); notionalIntf.allparams_field = targs.toList(); notionalIntf.tsym.flags_field |= INTERFACE; return notionalIntf.tsym; } --- 2463,2473 ---- if (i.isParameterized()) { targs.appendList(i.tsym.type.allparams()); } supertypes.append(i.tsym.type); } ! IntersectionClassType notionalIntf = types.makeIntersectionType(supertypes.toList()); notionalIntf.allparams_field = targs.toList(); notionalIntf.tsym.flags_field |= INTERFACE; return notionalIntf.tsym; }
*** 4030,4040 **** if (bounds.length() == 0) { return syms.objectType; } else if (bounds.length() == 1) { return bounds.head.type; } else { ! Type owntype = types.makeCompoundType(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; --- 4029,4039 ---- if (bounds.length() == 0) { return syms.objectType; } else if (bounds.length() == 1) { return bounds.head.type; } else { ! 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;