error for not accessible types mentioned by inferred functional type (IDEA-143417)

This commit is contained in:
Anna Kozlova
2015-08-18 12:34:31 +02:00
parent 676c477fab
commit 0da30526fd
3 changed files with 45 additions and 11 deletions
@@ -0,0 +1,18 @@
import java.util.function.Consumer;
class Test {
{
consume(<error descr="'Outer.A' has private access in 'Outer'">o -> {}</error>, new Outer.B(), new Outer.C());
consume(<error descr="'Outer.A' has private access in 'Outer'">Test::foo</error>, new Outer.B(), new Outer.C());
}
private static void foo(Object o) {}
private static <T> void consume(Consumer<T> c, T... element) {}
}
class Outer {
private static class A {}
public static class B extends A {}
public static class C extends A {}
}