parth
06/15/2020, 10:50 PMclass Foo {
val one : String by someProperty()
val two : String? by someProperty()
}
….and if so, what would be the signature of operator fun getValue(…)?
I guess I could do val two : String? by someOptionalProperty() to make the type signature easier, but that feels like I’m giving up, y’know?bezrukov
06/15/2020, 11:11 PMlazy)
just leave it as T and perform unchecked cast if necessary (like return null as T)parth
06/15/2020, 11:11 PMaraqnid
06/16/2020, 9:18 AMprovideDelegate if you want to return different implementations for nullable vs non-nullable properties (Gradle’s kotlin-dsl does this for project properties, for example)