Michael de Kaste
10/13/2020, 1:43 PMMichael de Kaste
10/13/2020, 1:44 PMval code: String
val description: String?
so why can't I delegate?streetsofboston
10/13/2020, 1:46 PMgetValue(…)
is an extension function on KProperty0
, and you’d need to import
that getValue
extension function….?Michael de Kaste
10/13/2020, 1:48 PMstreetsofboston
10/13/2020, 1:48 PMMichael de Kaste
10/13/2020, 1:51 PMstreetsofboston
10/13/2020, 1:53 PMgetValue
extension function is defined in the the kotlin.reflect
package, in the PropertyReferenceDelegates.kt
file in the kotlin-stdlib-common library…streetsofboston
10/13/2020, 1:53 PMVampire
10/13/2020, 1:57 PMstreetsofboston
10/13/2020, 1:58 PMMichael de Kaste
10/13/2020, 1:59 PMMichael de Kaste
10/13/2020, 1:59 PMMichael de Kaste
10/13/2020, 1:59 PMstreetsofboston
10/13/2020, 2:00 PMTobias Berger
10/13/2020, 2:13 PMoverride val code get() = product.code