Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
a), b), and c) all work, but d) fails with "GroovyCastException: Cannot cast object '[x]' with class 'java.util.ArrayList' to class 'java.util.LinkedHashSet'"
a)
List x = []
HashSet<String> lhs = x
b)
List x = ['x'] HashSet<String> lhs = x
c)
List x = []
LinkedHashSet<String> lhs = x
d)
List x = ['x'] LinkedHashSet<String> lhs = x