xingstarx
01/09/2018, 4:05 AMkotlin fun <T> KProperty0<T>.addObserver(observer: (T) -> Unit) {
(apply { isAccessible = true }.getDelegate() as MutableProperty<T>).addObserver(observer)
}
but I found Some mistakes appeared online, like this kotlin.reflect.full.IllegalPropertyDelegateAccessException: Cannot obtain the delegate of a non-accessible property. Use "isAccessible = true" to make the property accessible
can everyone help me