Files
kotlin-fork/idea/testData/refactoring/introduceProperty/extractLazyToClass.kt.after
T
2015-03-04 23:06:07 +03:00

18 lines
250 B
Plaintext

// WITH_RUNTIME
// EXTRACTION_TARGET: lazy property
import kotlin.properties.Delegates
class A(val n: Int = 1) {
val m: Int = 2
private val i: Int by Delegates.lazy {
m + n + 1
}
fun foo(): Int {
return i
}
}