is there a (hacky) way to manually set the manglin...
# getting-started
e
is there a (hacky) way to manually set the mangling of
operator
methods involving inline classes?
Platform declaration clash: The following declarations have the same JVM signature (plus-__B-jf8(JI)J):
inline fun Ptr<Byte>.`plus-__B-jf8`(offset: Int): Ptr<Byte> defined in kool
inline fun Ptr<Double>.`plus-__B-jf8`(offset: Int): Ptr<Double> defined in kool
inline fun Ptr<Float>.`plus-__B-jf8`(offset: Int): Ptr<Float> defined in kool
inline fun Ptr<Int>.`plus-__B-jf8`(offset: Int): Ptr<Int> defined in kool
inline fun Ptr<Long>.`plus-__B-jf8`(offset: Int): Ptr<Long> defined in kool
inline fun Ptr<Short>.`plus-__B-jf8`(offset: Int): Ptr<Short> defined in kool
a
have you tried using
@JvmName
? https://kotlinlang.org/docs/java-to-kotlin-interop.html#handling-signature-clashes-with-jvmname https://kotlinlang.org/docs/inline-classes.html#calling-from-java-code
You can call functions that accept inline classes from Java code. To do so, you should manually disable mangling: add the
@JvmName
annotation before the function declaration
e
yep, it works! For some unknown reasons I was pretty sure
JvmName
couldn't work with
operators
..
🚀 1
thanks @Adam S
a
you’re welcome!