Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0-beta-2
-
Fix Version/s: 2.0-beta-3
-
Component/s: None
-
Labels:None
-
Number of attachments :
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()
Fixed by commits: