Functions declared as `internal external` on the J...
# compiler
j
Functions declared as
internal external
on the JVM still get name mangling which means they fail to link to the C function. Expected? Too late to change? Can't change? I guess I could mangle my C functions to match, but it's a surprising thing to encounter when all I did was raise the visibility from private to internal and now I have to revert that and make an internal trampoline or change to a dedicated internal class hosting the external links as public to avoid the mangling.
d
Can you use
JvmName
?
j
Uh... Maybe!
I'm not sure why I didn't think of that
Been doing too much native lol
I'll try later, thanks
So it works, but it also feels like the use of
external
should not require this
nod 1
Sometimes I name my `external`s in JS to a friendly name and then
@JsName
them to their platform name. That's fine, I can do that with the JVM, too. But if i name my JS
external
something without an
@JsName
I expect it to match rather than be mangled to
whatever$module_name
by default.