Revert "ReplaceWith: suggest for "invoke" extension"

This reverts commit be194c34
This commit is contained in:
Yan Zhulanow
2020-10-24 00:22:07 +09:00
parent 04457e92d0
commit 87574dddd9
13 changed files with 4 additions and 184 deletions
@@ -1,14 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
}
fun usage(executor: Executor) {
<caret>executor {
// do something
}
}
@@ -1,14 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
}
fun usage(executor: Executor) {
executor.execute {
// do something
}
}
@@ -1,18 +0,0 @@
// "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) {
<caret>executor {
// do something
}
}
@@ -1,18 +0,0 @@
// "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
}
}
@@ -1,14 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
fun usage(executor: Executor) {
<caret>invoke {
// do something
}
}
}
@@ -1,14 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
fun usage(executor: Executor) {
execute {
// do something
}
}
}
@@ -1,17 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
val self: Executor
get() = this
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
}
fun usage(executor: Executor) {
executor.<caret>self {
// do something
}
}
@@ -1,17 +0,0 @@
// "Replace with 'execute(action)'" "true"
class Executor {
val self: Executor
get() = this
@Deprecated("Use Executor.execute(Runnable) instead.", ReplaceWith("execute(action)"))
operator fun invoke(action: () -> Unit) {}
fun execute(action: () -> Unit) {}
}
fun usage(executor: Executor) {
executor.self.execute {
// do something
}
}