[
https://issues.apache.org/jira/browse/GROOVY-7997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Wagenleitner updated GROOVY-7997:
--------------------------------------
Description:
Assume the following example:
{code}
def x = Random.newInstance().nextLong()
def asBigDecimal(BigDecimal bd){
println "bigdecimal value is $bd"
}
println "long value is $x"
asBigDecimal(x)
{code}
This will produce two different print outs.
My expecation is that the printed numbers are equal.
was:
Assue the following example:
def x = Random.newInstance().nextLong()
def asBigDecimal(BigDecimal bd){
println "bigdecimal value is $bd"
}
println "long value is $x"
asBigDecimal(x)
This will produce two different print outs.
My expecation is that the printed numbers are equal.
> calling method having a Bigdecimal parameter with a long produces incorrect
> bigdecimal
> --------------------------------------------------------------------------------------
>
> Key: GROOVY-7997
> URL: https://issues.apache.org/jira/browse/GROOVY-7997
> Project: Groovy
> Issue Type: Bug
> Components: groovy-jdk, groovy-runtime
> Affects Versions: 2.4.6
> Environment: linux
> Reporter: Detlef Brendle
>
> Assume the following example:
> {code}
> def x = Random.newInstance().nextLong()
> def asBigDecimal(BigDecimal bd){
> println "bigdecimal value is $bd"
> }
> println "long value is $x"
> asBigDecimal(x)
> {code}
> This will produce two different print outs.
> My expecation is that the printed numbers are equal.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)