Groovy
  1. Groovy
  2. GROOVY-3033

/= assignment operator breaks type system

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

        Issue Links

          Activity

          Marco Ladermann created issue -
          Jochen Theodorou made changes -
          Field Original Value New Value
          Priority Critical [ 2 ] Major [ 3 ]
          Fix Version/s 1.5.8 [ 14630 ]
          Paul King made changes -
          Link This issue relates to GROOVY-2665 [ GROOVY-2665 ]
          Jochen Theodorou made changes -
          Fix Version/s 1.6.1 [ 14852 ]
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Jochen Theodorou [ blackdrag ]
          Fix Version/s 1.7-beta-1 [ 14014 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Mark Thomas made changes -
          Workflow jira [ 12732040 ] Default workflow, editable Closed status [ 12743925 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12967235 ] Default workflow, editable Closed status [ 12974945 ]

            People

            • Assignee:
              Jochen Theodorou
              Reporter:
              Marco Ladermann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development