public class test { public int foo() { } private void bar() { Function foo = i -> i; } Function foo = i -> true; }