Consider the following:
def i = (0..10).getFrom() // "T getFrom()" from "interface Range<T extends Comparable>"
The type of "i" is displayed as Comparable<Integer> when it should be just Integer.
abstract class Abstract<T extends Abstract<T>> {
T withStuff(value) {
// ...
return (T) this
}
}
class Concrete extends Abstract<Concrete> {
Concrete withThing(value) {
// ...
return this
}
}
def x,y
new Concrete().withStuff(x).withThing(y)
"withThing" is showing as unknown (underlined) because the return type of "withStuff" is inferred as T, not Concrete.
Consider the following:
The type of "i" is displayed as
Comparable<Integer>when it should be justInteger."withThing" is showing as unknown (underlined) because the return type of "withStuff" is inferred as
T, notConcrete.