9dd8eda1c9
Library methods such as 'listOf' are resolved to have the package fragments as their parents, but JVM expects their containing file classes as parents. This fix generates those file classes and uses them as parent replacements for such library methods.
22 lines
403 B
Kotlin
Vendored
22 lines
403 B
Kotlin
Vendored
// KJS_WITH_FULL_RUNTIME
|
|
// WITH_RUNTIME
|
|
|
|
abstract class BaseClass {
|
|
protected open val menuId: Int = 0
|
|
|
|
public fun run(): Pair<String, Boolean> =
|
|
"$menuId" to (menuId == 0)
|
|
}
|
|
|
|
class ImplClass: BaseClass() {
|
|
override val menuId: Int = 3
|
|
}
|
|
|
|
public fun box(): String {
|
|
val result = ImplClass().run()
|
|
|
|
if (result != ("3" to false)) return "Fail: $result"
|
|
|
|
return "OK"
|
|
}
|