[BLUEJ-365] CodePad not casting some values correctly
This worked in 3.0.4 but is now broken in 3.0.5. In CodePad, evaluate the following:
(double) -5 -5.0 (double) Correct
(int) -5 -5 (int) Correct
(double) 4 4.0 (double) Correct
(int) 4 4 (int) Correct
(int) -5.4 -5.0 (double) Not correct. Should be -5 (int)
(byte) -5.3 -5.0 (double) Should be -5 (byte)
(float) -1.0 -1.0 (double) Not correct, wrong type
(double) -5.2
-5.2 (double) Correct
(float) -5.2 -5.199999809265137 (double) Maybe correct value, but wrong type
-5.2F -5.2 (float) Correct
System.out.println((int) -5.4); Outputs -5, which is correct
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.0.6