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

Allows assignment of a value to a numeric type which is too large for it to hold

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.0-beta-4
    • None
    • parser
    • None
    • All

    Description

      Integer x = 2147483648;
      println x.class
      println x

      This will create a long and "successfully" assign it to an Integer, resulting in the following output:
      class java.lang.Integer
      -2147483648

      This could be a little confusing for a user.

      Attachments

        Issue Links

          Activity

            People

              guillaume Guillaume Sauthier
              bl7385 Brian Larson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: