Maurizio Cimadamore a494f0ab86 8003280: Add lambda tests
Turn on lambda expression, method reference and default method support

Reviewed-by: jjg
2012-11-17 19:01:03 +00:00

19 lines
483 B
Java

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