I have the following methods on a class ```execute...
# getting-started
e
I have the following methods on a class
Copy code
execute { } (runnable: (() -> Unit)!)
execute { } (callable: (() -> T!)!)
if I simply type
execute{ }
the first one will be picked up, while I'd need the second one is there a way to explicitly select the second option with SAM, or is this the only option I have?
Copy code
val filtered = environmentVariables.execute(
    Callable { classpath.filter { GradleRunnerFactory.CLASSPATH_GRADLE_CACHE(it) } }
)
v
@Javier refactoring is not necessarily possible. For example
java.util.concurrent.ScheduledExecutorService#schedule
has one overload with
Runnable
and one with
Callable
.
But yes,
execute<SomeType> { ... }
should work
e
it does indeed, thanks
👌 1