interface I1 { void m(); } interface I2 { X m(); } class Ambiguity1 { static void m(I1 i1) {} static void m(I2 i2) {} { m(()->{throw new AssertionError();}); m(() -> {}); m(() -> { if (false) return; throw new RuntimeException(); }); } }