Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7385

Invalid Integer & Long literals compile when they shouldn't

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.3
    • 2.5.0-alpha-1
    • syntax
    • None
    • Mac OS X

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              msgilligan Sean Gilligan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: