Hello, I'm trying to call the `hashCode` function ...
# kotlin-native
d
Hello, I'm trying to call the
hashCode
function from my KMP project targeting jvm js and ios. The function provided by the kotlin-stdlib and kotlin-stdlib-js return the same results for a given
String
, however, the function provided by the Kotlin/Native stdlib (which seems to call
Any.identityHashCode()
under the covers) returns different results for the same
String
. Does anyone know if this is intentional and whether there might be a way to get results from the Kotlin/Native target that are consistent with the other targets?
a
I’m not sure if Kotlin Multiplatform have any guarantees here, but it seems to be a valid concern, so worth a report. Please consider filing an issue here: kotl.in/issue
d
Tracked here