Issue Details (XML | Word | Printable)

Key: GROOVY-1164
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Jochen Theodorou
Reporter: Russel Winder
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
groovy

Object.collect(Closure) fails to work on Set

Created: 28/Nov/05 05:59 AM   Updated: 03/Jul/07 12:30 PM   Resolved: 03/Jul/07 12:30 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1-beta-2

Time Tracking:
Not Specified

Environment: Debian GNU/Linux ; JDK 1.5.0_05 ; Groovy CVS 2005-11-28T11:00


 Description  « Hide

The following script:

def a = [ 'a' , 'b' , 'c' , 'd' ] as Set
def c = a.collect { it + it }
println c.getClass ( ).getName ( ) + ": " + c

results in:

Caught: java.lang.ClassCastException: java.util.ArrayList
at kolesa.run(kolesa.groovy:8)
at kolesa.main(kolesa.groovy)



Jochen Theodorou added a comment - 03/Jul/07 12:30 PM

fixed