Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.5.5
-
None
Description
The following code will not compile with Groovy:
Math.ceil(1/2)
Groovy insists that it try to find Math.ceil(BigDecimal), as opposed to performing the conversion to a double. The following will work though:
Math.ceil((double)1/2)
But the above should not be necessary as Groovy should unbox it.
Incidentally, this did work with version 2.4.12 and below.
Attachments
Issue Links
- is related to
-
GROOVY-8325 @CompileStatic calls wrong newInstance method.
- Closed
-
GROOVY-8488 STC: floating-point literals no longer accepted as args to method with double parameter
- Closed