|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
javac doesn't seem to handle intersection types membership in a consistent way (it allows access to protected members but forbids access to package private members)
there are several tck tests regarding this issue:
allows access to protected members:
JCK-compiler-7/tests/lang/TYPE/type154/type15406/type15406.html
forbits access to package private members:
JCK-compiler-7/tests/lang/CONV/conv148/conv148.html
There's also another related problem:
class X<E extends X<E>> {
private static int i;
int f() {
return E.i;
}
}
'i' shouldn't be accessible from E since is private (and type variable should not inherit private members).
|