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

Bugs in handling lists consisting of numbers of mixed types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-2, 1.0-JSR-3
    • 1.0-JSR-4
    • None
    • None

    Description

      1. list.unique()

      assert 3, 2.0, 1.0, 3L, (short)3, (long)2].unique() == [1, 2, 3] // This should work.

      2. equality

      assert(1 = 1.0 && 2 == 2L) // work now
      asswer [1, 2] == [1.0, 2L] // So this should work.

      3. list.sort()

      assert [1, 2, 1.5].sort() == [1, 1.5, 2] // This should work. But this throws CCE now.

      4. minus

      assert [1, 3, 2, 1] - [3.0] == [1, 2, 1] // This should work, but throws CCE now.

      5. intersect

      assert [1, 3, 2, 1].intersect( [3.0]) == [3] // This should work, but throws CCE now.

      6. max

      assert [1, 3, 2.0, 1].max() == 3 // This should work, but throws CCE now.

      7. max

      assert [1, 3, 2.0, 1].min() == 1 // This should work, but throws CCE now.

      Attachments

        Activity

          People

            phkim Kim, Pilho
            phkim Kim, Pilho
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: