aoqi@0: /* @test /nodynamiccopyright/ aoqi@0: * @bug 7192246 aoqi@0: * @summary negative test for ambiguous defaults aoqi@0: * @compile/fail/ref=Neg01.out -XDrawDiagnostics Neg01.java aoqi@0: */ aoqi@0: aoqi@0: class Neg01 { aoqi@0: interface IA { default int m() { return Neg01.m1(this); } } aoqi@0: interface IB { default int m() { return Neg01.m2(this); } } aoqi@0: aoqi@0: static class A implements IA {} aoqi@0: static class B implements IB {} aoqi@0: aoqi@0: static class AB implements IA, IB {} aoqi@0: aoqi@0: static int m1(IA a) { return 0; } aoqi@0: static int m2(IB b) { return 0; } aoqi@0: }