Files
kotlin-fork/idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls/invoke2.kt.after
T
Toshiaki Kameyama be194c3460 ReplaceWith: suggest for "invoke" extension
#KT-8597 Fixed
2020-10-23 15:46:49 +09:00

18 lines
386 B
Plaintext
Vendored

// "Replace with 'Foo.execute(action)'" "true"
class Executor {
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("Foo.execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
}
object Foo {
fun execute(action: () -> Unit) {}
}
fun usage(executor: Executor) {
Foo.execute {
// do something
}
}