The following code doesn't compile. No idea why ? public interface IOBug { private IOBug foo() { return this; } default IOBug flatMap(Function<? super Object, ? extends IOBug> map) { return map.apply(null).foo(); ^------ } } It works if foo is declared as a default method instead of a private method. regards, Rémi