fixed delegation sample

This commit is contained in:
sergeych committed 2026-01-06 01:00:20 +01:00
1 parent 73854f21f3
commit 8611543623
1 file changed
+2 -1
+2 -1
View File
@@ -57,7 +57,8 @@ class lazy(val creator) : Delegate {
override fun getValue(thisRef, name) {
if (value == Unset) {
value = creator()
// calculate value using thisRef as this:
value = with(thisRef) creator()
}
value
}