Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-beta-2
-
None
-
None
Description
In the following code, the computed lowest upper bound of the list doesn't have the correct type.
class Test { static test2() { if (new Random().nextBoolean()) { def a = new ArrayList<String>() a << "a" << "b" << "c" return a } else { def b = new LinkedList<Number>() b << 1 << 2 << 3 return b } } static test() { def result = test2() result[0].toInteger() //result[0].toString() } } new Test()