-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
beta2
-
generic
-
solaris_7
-
Verified
frog:~/workspaces/test/NotWithinBounds $ cat -n NotWithinBounds.java
1 class Builder<Community> {
2
3 class Produces<B extends AbstractBuilder> {}
4
5 interface AbstractBuilder {}
6
7 }
8
9 class MyBuilder extends Builder<String> {
10 // the next two lines both generate "not within bounds" errors
11 Produces<HTMLConsumer> p0;
12 Produces<MyABuilder> p1;
13 }
14
15 class MyABuilder implements HTMLConsumer {
16 }
17
18 interface HTMLConsumer extends Builder<String>.AbstractBuilder {}
19
20
21
frog:~/workspaces/test/NotWithinBounds $ newjavac NotWithinBounds.java
NotWithinBounds.java:11: type parameter HTMLConsumer is not within its bound
Produces<HTMLConsumer> p0;
^
NotWithinBounds.java:12: type parameter MyABuilder is not within its bound
Produces<MyABuilder> p1;
^
2 errors
frog:~/workspaces/test/NotWithinBounds $
1 class Builder<Community> {
2
3 class Produces<B extends AbstractBuilder> {}
4
5 interface AbstractBuilder {}
6
7 }
8
9 class MyBuilder extends Builder<String> {
10 // the next two lines both generate "not within bounds" errors
11 Produces<HTMLConsumer> p0;
12 Produces<MyABuilder> p1;
13 }
14
15 class MyABuilder implements HTMLConsumer {
16 }
17
18 interface HTMLConsumer extends Builder<String>.AbstractBuilder {}
19
20
21
frog:~/workspaces/test/NotWithinBounds $ newjavac NotWithinBounds.java
NotWithinBounds.java:11: type parameter HTMLConsumer is not within its bound
Produces<HTMLConsumer> p0;
^
NotWithinBounds.java:12: type parameter MyABuilder is not within its bound
Produces<MyABuilder> p1;
^
2 errors
frog:~/workspaces/test/NotWithinBounds $