Kotlin: Enhance methods test

This commit is contained in:
Ian Lynagh
2022-06-27 17:59:52 +01:00
parent 7430a413ad
commit 7dc490ff7c
4 changed files with 136 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import kotlin.properties.Delegates
class MyClass {
val lazyProp by lazy {
5
}
var observableProp: String by Delegates.observable("<none>") {
prop, old, new ->
println("Was $old, now $new")
}
}