(byte) type cast in constructor calls

master
Egor.Ushakov 8 years ago
parent 997a7747d6
commit 4de826363f
  1. 2
      src/org/jetbrains/java/decompiler/modules/decompiler/exps/NewExprent.java
  2. BIN
      testData/classes/pkg/TestPrimitives.class
  3. 11
      testData/results/TestPrimitives.dec
  4. 4
      testData/src/pkg/TestPrimitives.java

@ -340,7 +340,7 @@ public class NewExprent extends Exprent {
buf.append(", "); buf.append(", ");
} }
ExprProcessor.getCastedExprent(expr, leftType, buf, indent, true, tracer); ExprProcessor.getCastedExprent(expr, leftType, buf, indent, true, false, true, tracer);
firstParam = false; firstParam = false;
} }

@ -65,6 +65,10 @@ public class TestPrimitives {
this.printByte((byte)this.getInt());// 68 this.printByte((byte)this.getInt());// 68
this.printShort((short)this.getInt());// 69 this.printShort((short)this.getInt());// 69
}// 70 }// 70
public void constructor() {
new Byte((byte)1);// 73
}// 74
} }
class 'pkg/TestPrimitives' { class 'pkg/TestPrimitives' {
@ -201,6 +205,11 @@ class 'pkg/TestPrimitives' {
f 65 f 65
12 66 12 66
} }
method 'constructor ()V' {
4 69
9 70
}
} }
Lines mapping: Lines mapping:
@ -237,3 +246,5 @@ Lines mapping:
68 <-> 65 68 <-> 65
69 <-> 66 69 <-> 66
70 <-> 67 70 <-> 67
73 <-> 70
74 <-> 71

@ -68,4 +68,8 @@ public class TestPrimitives {
printByte((byte)getInt()); printByte((byte)getInt());
printShort((short)getInt()); printShort((short)getInt());
} }
public void constructor() {
new Byte((byte)1);
}
} }

Loading…
Cancel
Save