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:
committed by
Egor.Ushakov
parent
d382ba2709
commit
5db9ad29c8
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user