Files
kotlin-fork/idea/testData/refactoring/extractFunction/controlFlow/unextractable/anonymousObject.kt
T

16 lines
261 B
Kotlin

trait Callable<T> {
fun call(): T
}
fun foo(a: Int): Int {
// SIBLING:
val o = <selection>object: Callable<Int> {
val b: Int = 1
override fun call(): Int {
return a + b
}
}</selection>
return o.call()
}