You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (JIRA)" <ji...@apache.org> on 2015/04/21 22:26:59 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=14505690#comment-14505690 ]
Jochen Theodorou commented on GROOVY-7385:
------------------------------------------
Ok, we have to clarify something here. There us the case thar 2147483648 is pared as long instead of int. And there is the case that 2147483648I is a long converted to int, even though int does not fit. I thought you mean the first case, but am I right you are fine with that and it is hte second case which is bothering you?
> 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
> Assignee: Jochen Theodorou
>
> 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)