// FILE: Callable.java public interface Callable { V call() throws Exception; } // FILE: Future.java public class Future {} // FILE: Executor.java public interface Executor { Future submit(Callable task); Future submit(Runnable task); } // FILE: test.kt fun f(): String = "test" class A { fun schedule1(e: Executor): Future = e.submit(::f) fun schedule2(e: Executor): Future = e.submit { f() } }