Fix methods inherited from Any in interop value types
This commit is contained in:
committed by
SvyatoslavScherbina
parent
d1859dd280
commit
c9b04bc0bb
@@ -27,9 +27,12 @@ class NativePointedBox(val value: NativePointed) {
|
||||
return this.value == other.value
|
||||
}
|
||||
|
||||
override fun hashCode() = value.hashCode()
|
||||
// TODO: can't delegate the following methods to `this.value`
|
||||
// because `NativePointed` doesn't provide them.
|
||||
|
||||
override fun toString() = value.toString()
|
||||
override fun hashCode() = this.value.rawPtr.hashCode()
|
||||
|
||||
override fun toString() = "NativePointed(raw=${this.value.rawPtr})"
|
||||
}
|
||||
|
||||
fun boxNativePointed(value: NativePointed?) = if (value != null) NativePointedBox(value) else null
|
||||
|
||||
Reference in New Issue
Block a user