Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.8.3
-
None
-
OSX, Linux for sure, perhaps others
Description
In Groovy 1.8.3 the first test passes while the second fails. The return type of the second operation (and third, if it were to get to it) becomes a Double.
The tests both pass in 1.8.2.
class BigDecimalTest extends GroovyTestCase{ public void testMath1() { assert BigDecimal == (3/2).getClass() assert BigDecimal == (7.0/8.0).getClass() assert BigDecimal == (new BigDecimal(3.0)/new BigDecimal(2.0)).getClass() true } public void testMath2() { assert BigDecimal == (3/2).getClass() assert BigDecimal == (7.0/8.0).getClass() assert BigDecimal == (new BigDecimal(3.0)/new BigDecimal(2.0)).getClass() } }