-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
5.0
-
generic
-
solaris_8
frog:~/gjc-work $ cat -n T.java
1 class Outer<T> {
2 class Inner<U extends Number> {
3 U u;
4
5 void set(U u) {
6 this.u=u;
7 }
8 }
9
10 public static void main(String[] args) {
11 (new Outer<Object>()).new Inner().set(new Integer(2));
12 // (new Outer<Object>()).new Inner().set("toto");
13 }
14 }
frog:~/gjc-work $ newjavac -gj T.java
T.java:11: unexpected type
required: class, package
found : value
(new Outer<Object>()).new Inner().set(new Integer(2));
^
1 error
frog:~/gjc-work $
1 class Outer<T> {
2 class Inner<U extends Number> {
3 U u;
4
5 void set(U u) {
6 this.u=u;
7 }
8 }
9
10 public static void main(String[] args) {
11 (new Outer<Object>()).new Inner().set(new Integer(2));
12 // (new Outer<Object>()).new Inner().set("toto");
13 }
14 }
frog:~/gjc-work $ newjavac -gj T.java
T.java:11: unexpected type
required: class, package
found : value
(new Outer<Object>()).new Inner().set(new Integer(2));
^
1 error
frog:~/gjc-work $