Removed setConstType() from is isBoxingCall() to avoid hidden side effect

Const type is now adjusted correctly also when the target is
java.lang.Character or java.lang.Integer
This commit is contained in:
Dmitry Cherniachenko
2017-06-23 21:43:23 +02:00
committed by Egor.Ushakov
parent d382ba2709
commit 5db9ad29c8
6 changed files with 248 additions and 221 deletions

View File

@@ -12,7 +12,9 @@ public class TestPrimitives {
printDouble(1.23);
printChar('Z');
String.format("%b, %d, %d, %d, %c", true, 1, 213, 40_000, 'c', 42L);
printIntBoxed(40_000);
String.format("%b, %d, %d, %d, %c, %d", true, 1, 213, 40_000, 'c', 42L);
System.out.println(String.format("%b, %d, %d, %d", getBoolean(), getByte(), getShort(), getInt()));
}
@@ -49,6 +51,11 @@ public class TestPrimitives {
}
public void printIntBoxed(Integer i) {
System.out.println(String.format("%d", i));
}
public boolean getBoolean() {
return false;
}