|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
This somewhat confusing code result in a bound error. It passed as of recent builds.
------FBoundedColorPoint.java-----------------
public class FBoundedColorPoint
{
class AbstractPoint<T extends AbstractPoint<T>> {
int x, y;
boolean equals(T that) { return (this.x == that.x) && (this.y == that.y); }
}
class Point extends AbstractPoint<Point> { }
public FBoundedColorPoint() {
AbstractPoint<? super Point> con; // <<pass>>
}
}
---------------
This test case I though was in the regression test set, so maybe it was removed(?) and so I gave it rather low priority. The error message is:
FBoundedColorPoint.java:12: type parameter capture#716 of ? super FBoundedColorPoint.Point is not within its bound
AbstractPoint<? super Point> con; // <<pass>>
^
1 error
|