/* * @test /nodynamiccopyright/ * @bug 8231827 * @summary Verify behavior w.r.t. non-reifiable types in instanceof * @compile/fail/ref=ReifiableOld-old.out --release 15 -XDrawDiagnostics ReifiableOld.java * @compile/fail/ref=ReifiableOld.out -XDrawDiagnostics ReifiableOld.java */ public class ReifiableOld implements ReifiableOldI { private static boolean test(Object o, List l1, List l2) { return o instanceof ListImpl && l1 instanceof ListImpl && l2 instanceof ListImpl && l2 instanceof ListImpl && l1 instanceof Unrelated; } public class List {} public class ListImpl extends List {} public class Unrelated {} } interface ReifiableOldI {}