// Test case for issue #577: // Test with expected errors: checker/tests/nullness/Issue577.java // https://github.com/typetools/checker-framework/issues/577 class Banana extends Apple { @Override void fooIssue577Outer(int[] array) {} class InnerBanana extends InnerApple { @Override void foo(int[] array, long[] array2, F2 param3) {} } } class Apple { void fooIssue577Outer(T param) {} class InnerApple { void foo(T param, E param2, F param3) {} } } class Pineapple extends Apple { @Override void fooIssue577Outer(E array) {} } class IntersectionAsMemberOf { interface MyGenericInterface { F getF(); } > void foo(T param) { String s = param.getF(); } } class UnionAsMemberOf { interface MyInterface { T getT(); } class MyExceptionA extends Throwable implements Cloneable, MyInterface { public String getT() { return "t"; } } class MyExceptionB extends Throwable implements Cloneable, MyInterface { public String getT() { return "t"; } } void bar() throws MyExceptionA, MyExceptionB {} void foo1(MyInterface param) throws Throwable { try { bar(); } catch (MyExceptionA | MyExceptionB ex1) { String s = ex1.getT(); } } } final class Issue577Outer { private Inner createInner(ReferenceQueue q) { return new Inner(q); } private final class Inner { private Inner(ReferenceQueue q) {} } } class ReferenceQueue {}