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/07/26 08:14:20 UTC

[jira] [Commented] (GROOVY-7385) Invalid Integer & Long literals compile when they shouldn't

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

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

GitHub user msgilligan opened a pull request:

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

    Add tests for valid and invalid integer literals (shouldCompile/shouldNotCompile)

    Add tests for integer literals that `shouldCompile` and `shouldNotCompile`.
    
    Some of these tests currently fail because of [GROOVY-7385](https://issues.apache.org/jira/browse/GROOVY-7385).
    
    I'm not sure what the right way is to submit failing tests, so please let me know if I should change things up. This PR was submitted earlier, but was lost when GROOVY-7385 was closed -- before it was reopened.
    


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

    $ git pull https://github.com/msgilligan/groovy msgilligan-integer-literal-tests-take2

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

    https://github.com/apache/groovy/pull/373.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 #373
    
----

----


> Invalid Integer & Long literals compile when they shouldn't
> -----------------------------------------------------------
>
>                 Key: GROOVY-7385
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7385
>             Project: Groovy
>          Issue Type: Bug
>          Components: syntax
>    Affects Versions: 2.4.3
>         Environment: Mac OS X
>            Reporter: Sean Gilligan
>
> 2147483648I should be an invalid Integer literal.
> 9223372036854775808L should be an invalid Long literal.
> Both currently compile (and produce an unexpected value -- well, it would be the expected value in 2's complement math)
> I created some unit tests to show the problem -- not sure if I put them in the right place, but they do fail as I expect them to.
> The Github PR is here: 
> https://github.com/groovy/groovy-core/pull/657
> The build output is here:
> http://ci.groovy-lang.org/viewLog.html?buildId=16410&buildTypeId=Groovy_Jdk7Build



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