interface I { void m(int x); } class Test { void foo(Object x) {} void bar() { foo(!(int x)-> {}); foo((int x)-> { } instanceof Object ); } I bazz() { foo((I)(int x)-> { }); I o = (I)(int x)-> { }; return (int x) -> {}; } }