langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransTypes.java
equal
deleted
inserted
replaced
762 : null; |
762 : null; |
763 tree.expr = typeCast != null && types.isSameType(typeCast.type, originalTarget, true) |
763 tree.expr = typeCast != null && types.isSameType(typeCast.type, originalTarget, true) |
764 ? typeCast.expr |
764 ? typeCast.expr |
765 : newExpression; |
765 : newExpression; |
766 } |
766 } |
767 if (originalTarget.isCompound()) { |
767 if (originalTarget.isIntersection()) { |
768 Type.IntersectionClassType ict = (Type.IntersectionClassType)originalTarget; |
768 Type.IntersectionClassType ict = (Type.IntersectionClassType)originalTarget; |
769 for (Type c : ict.getExplicitComponents()) { |
769 for (Type c : ict.getExplicitComponents()) { |
770 Type ec = erasure(c); |
770 Type ec = erasure(c); |
771 if (!types.isSameType(ec, tree.type)) { |
771 if (!types.isSameType(ec, tree.type)) { |
772 tree.expr = coerce(tree.expr, ec); |
772 tree.expr = coerce(tree.expr, ec); |