groovy

sum() should not assume the items are numbers or strings but apply normal duck typing

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.1-beta-1
  • Fix Version/s: 1.1-beta-2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

sum() currently assumes that the items being summed are all numbers or strings.
def list1 = [1, 2]
def list2 = [3, 4]
def list3 = [5, 6]
[list1, list2, list3].sum() currently produces the string "[1, 2][3, 4][5, 6]"
it should produce the list [1, 2, 3, 4, 5, 6] which is what
list1 + list2 + list3 produces.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: