Hi, does someone develop kotlin/js at windows plea...
# javascript
j
Hi, does someone develop kotlin/js at windows please? Friend of mine has a problem with compilation - compiler produces bad suffixes for overloaded non public companion methods, all are ended by _0. He even tried it at plain fresh instalation in virtual servers, got good result at linux but wrong again at win10.
a
I am using win 10. No problems. I am not sure what suffixes you are talking about
j
Kotlin usually adds a random suffix to name of method to avoid collision between same names from different modules. Or to solve collision of overloaded methods. Example: kotlin: companion object{ protected fun foo(i: String){....} protected fun foo(i: Int){....} protected fun foo(i: Double){....} } in JS names will be foo_0, foo_1, foo_2 he experiences problem that all variants has suffix _0, if methods are declared in companion object and are protected. And only in win10.
a
It is called name mangling and I do not think it is connected to windows 10. In general, when you are calling kotlin function from JS, it is not guaranteed to work. You should use JsName and/or JsExport annotations to control that.
j
In this case it is all kotlin translated to JS. Win10 is only difference we found;)