add warning on switch by inaccessible enums (IDEA-65961 )

This commit is contained in:
anna
2011-08-24 12:05:55 +02:00
parent 95e1890f97
commit 2787a3a5f4
3 changed files with 35 additions and 0 deletions
@@ -0,0 +1,23 @@
interface A {
B getB();
class B {
public C c;
private enum C {
SOME
}
}
}
class D {
public static void f(A a) {
A.B b = a.getB();
switch (<error descr="A.B.C is inaccessible here">b.c</error>) {
case SOME:
break;
}
}
}