(byte) type cast in constructor calls

This commit is contained in:
Egor.Ushakov
2017-04-27 15:21:44 +03:00
parent 997a7747d6
commit 4de826363f
4 changed files with 16 additions and 1 deletions

View File

@@ -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;
} }

View File

@@ -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

View File

@@ -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);
}
} }