langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
changeset 23812 a53aa842f5cf
parent 23127 5aba53c2b9b2
child 24792 24452ca131a3
equal deleted inserted replaced
23811:4bbbcaad653f 23812:a53aa842f5cf
   746 
   746 
   747     public void visitTypeCast(JCTypeCast tree) {
   747     public void visitTypeCast(JCTypeCast tree) {
   748         tree.clazz = translate(tree.clazz, null);
   748         tree.clazz = translate(tree.clazz, null);
   749         Type originalTarget = tree.type;
   749         Type originalTarget = tree.type;
   750         tree.type = erasure(tree.type);
   750         tree.type = erasure(tree.type);
   751         tree.expr = translate(tree.expr, tree.type);
   751         tree.expr = translate(tree.expr, erasure(tree.expr.type));
   752         if (originalTarget.isCompound()) {
   752         if (originalTarget.isCompound()) {
   753             Type.IntersectionClassType ict = (Type.IntersectionClassType)originalTarget;
   753             Type.IntersectionClassType ict = (Type.IntersectionClassType)originalTarget;
   754             for (Type c : ict.getExplicitComponents()) {
   754             for (Type c : ict.getExplicitComponents()) {
   755                 Type ec = erasure(c);
   755                 Type ec = erasure(c);
   756                 if (!types.isSameType(ec, tree.type)) {
   756                 if (!types.isSameType(ec, tree.type)) {