import java.io.IOException; interface Callable { V call() throws Exception; } class Test2 { static void m(Callable c){} { m(() -> {throw new IOException();}); } }