[
https://issues.apache.org/jira/browse/GROOVY-8948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eric Milles updated GROOVY-8948:
--------------------------------
Fix Version/s: 3.0.20
4.0.16
> BigDecimal to primitive conversion not working
> ----------------------------------------------
>
> Key: GROOVY-8948
> URL: https://issues.apache.org/jira/browse/GROOVY-8948
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 2.5.5
> Reporter: Kenneth Gendron
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 3.0.20, 5.0.0-alpha-3, 4.0.16
>
>
> The following code will not compile with Groovy:
> {code:java}
> Math.ceil(1/2){code}
> Groovy insists that it try to find Math.ceil(BigDecimal), as opposed to
> performing the conversion to a double. The following will work though:
> {code:java}
> Math.ceil((double)1/2){code}
> But the above should not be necessary as Groovy should unbox it.
> Incidentally, this did work with version 2.4.12 and below.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)