Override toString function in stdlib delegates
Co-authored-by: ilya-g <ilya.gorbunov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
cfa06dbf74
commit
fb80c0cb0d
@@ -65,5 +65,8 @@ private class NotNullVar<T : Any>() : ReadWriteProperty<Any?, T> {
|
||||
public override fun setValue(thisRef: Any?, property: KProperty<*>, value: T) {
|
||||
this.value = value
|
||||
}
|
||||
|
||||
public override fun toString(): String =
|
||||
"NotNullProperty(${if (value != null) "value=$value" else "value not initialized yet"})"
|
||||
}
|
||||
|
||||
|
||||
@@ -40,4 +40,6 @@ public abstract class ObservableProperty<V>(initialValue: V) : ReadWriteProperty
|
||||
this.value = value
|
||||
afterChange(property, oldValue, value)
|
||||
}
|
||||
|
||||
override fun toString(): String = "ObservableProperty(value=$value)"
|
||||
}
|
||||
Reference in New Issue
Block a user