import java.util.*; class Tmp { interface Callable { V run() throws Exception; } List foo(Callable callable){ return null; } void test() { List list = foo(()->{ throw new Error(); } ); // IntelliJ error } }