Introduce Property: Place property before its usages
This commit is contained in:
@@ -5,10 +5,10 @@ import kotlin.properties.Delegates
|
||||
|
||||
val n: Int = 1
|
||||
|
||||
fun foo(): Int {
|
||||
return i
|
||||
}
|
||||
|
||||
private val i: Int by Delegates.lazy {
|
||||
n + 1
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
return i
|
||||
}
|
||||
Reference in New Issue
Block a user