-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b138
-
unknown
-
generic
-
Verified
Compiler accepts the following code:
class A<X> {
class B { }
B b = new B<>();
}
Moreover, error messages for the following code is misleading:
class A<X> {
class B { }
B b = new A<>.B<>();
}
The above is rejected with:
TestX.java:4: error: improperly formed type, type arguments given on a raw type
B b = new A<>.B<>();
^
This should simply be a parser error.
class A<X> {
class B { }
B b = new B<>();
}
Moreover, error messages for the following code is misleading:
class A<X> {
class B { }
B b = new A<>.B<>();
}
The above is rejected with:
TestX.java:4: error: improperly formed type, type arguments given on a raw type
B b = new A<>.B<>();
^
This should simply be a parser error.