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

18 lines
272 B
Plaintext

import kotlin.properties.Delegates
// WITH_RUNTIME
// EXTRACTION_TARGET: lazy property
class A {
private val i: Int by Delegates.lazy {
val a = 1 + 2
val b = a * 2
b
}
fun foo(): Int {
val b = i
val c = b - 1
}
}