I think I've found another compiler bug in the wild... Kotlin/JS doesn't seem to know how to instantiate a JS class properly. The compiler keeps emitting code to call the constructor as a function instead of using the new keyword. I can't seem to figure out how to nudge the compiler to do the right thing. =(

Follow

My search-fu only turned up this one JetBrains discussion on the topic:

discuss.kotlinlang.org/t/deriv

This was apparently an unsupported feature circa Jan 2019. But it's mid 2020 now. Surely Kotlin/JS has a better story for extending JS classes by now.

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!