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

/= assignment operator breaks type system

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.6
    • 1.6.1, 1.5.8, 1.7-beta-1
    • None
    • None

    Description

      while this works:
      groovy> long d = 100L
      groovy> d = d / 33L
      groovy> d.class

      Result: class java.lang.Long

      the following breaks the type system and produces a Long that is a BigDecimal!

      groovy> long d = 100L
      groovy> d /= 33L
      groovy> d.class

      Result: class java.math.BigDecimal

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              ladermann@hbg.dpa.de Marco Ladermann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: