You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/24 11:54:12 UTC

[jira] [Commented] (GROOVY-7841) Assert fails when accessing particular primitive values with @CompileStatic

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

ASF GitHub Bot commented on GROOVY-7841:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/338

    GROOVY-7841: Assert fails when accessing particular primitive values …

    …with @CompileStatic

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy7841

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/338.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #338
    
----
commit c7d106315226667248dca01af793bb24b96d8d97
Author: paulk <pa...@asert.com.au>
Date:   2016-05-24T11:52:12Z

    GROOVY-7841: Assert fails when accessing particular primitive values with @CompileStatic

----


> Assert fails when accessing particular primitive values with @CompileStatic
> ---------------------------------------------------------------------------
>
>                 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)