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

/= assignment operator breaks type system

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.6.1, 1.5.8, 1.7-beta-1
    • Component/s: None
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: