Introduce Variable: Avoid explicit types for expression of anonymous type

#KT-12078 Fixed
This commit is contained in:
Alexey Sedunov
2018-04-10 19:32:33 +03:00
parent c7e72af170
commit 62f654b3d2
4 changed files with 44 additions and 3 deletions
@@ -0,0 +1,9 @@
fun foo() {
bar(<selection>object: Runnable {
override fun run() {
}
}</selection>)
}
fun bar(runnable: Runnable) {
}
@@ -0,0 +1,10 @@
fun foo() {
val runnable = object : Runnable {
override fun run() {
}
}
bar(runnable)
}
fun bar(runnable: Runnable) {
}