When I run the "correct" lazy property example on Android Studio, I get an error for get: unresolved reference, none of the following candidates..."
Works ok online.
class LazyProperty(val initializer: () -> Int) {
var value: Int? = null
val lazy: Int
get() {
if (value == null) {
value = initializer()
}
return value!!
}
}
When I run the "correct" lazy property example on Android Studio, I get an error for
get
: unresolved reference, none of the following candidates..."Works ok online.