[ 
https://issues.apache.org/jira/browse/GROOVY-7841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297567#comment-15297567
 ] 

Paul King commented on GROOVY-7841:
-----------------------------------

Any multiple of 4294967296 will have the same result. Looking at the bytecode, 
there is an L2I inserted for the @CompileStatic case which just keeps the 
lowest 32 bits. I haven't checked into why just yet.

> Assert fails with @CompileStatic annotaion
> ------------------------------------------
>
>                 Key: GROOVY-7841
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7841
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.4.5
>            Reporter: paolo di tommaso
>            Priority: Minor
>
> The following assert for a non-zero long value fails when annotated with 
> CompileStatic. For example:
> {code}
> def foo() {
>   long value = 17179869184 
>   assert value, "Foo is OK"
> }
> @groovy.transform.CompileStatic
> def bar() {
>   long value = 17179869184 
>   assert value, "Bar failed"
> }
> foo()
> bar()
> java.lang.AssertionError: Bar failed. Expression: value. Values: value = 
> 17179869184
>       at ConsoleScript31.bar(ConsoleScript31:10)
>       at ConsoleScript31.run(ConsoleScript31:14)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to