Ian Stewart
04/04/2020, 3:35 PMUnresolved reference: Throws
in javascript compilation
I used the following trick to work around it:
commonMain:
expect annotation class MyThrows(vararg val exceptionClasses:KClass<out Throwable>);
jsMain:
actual annotation class MyThrows(
actual vararg val exceptionClasses:KClass<out Throwable>
) {}
jvmMain:
actual typealias MyThrows = kotlin.jvm.Throws
elsewhere:
actual typealias MyThrows = kotlin.native.Throws
… so I’m not blocked but am I missing something?