Fix exception in ultra-light classes in case of complex mpp hierarchy

Without the introduced override, default implementation of isEquivalentTo
runs delegate computation of `another` that is illegal
for KtUltraLightClass

^KT-28912 Fixed
This commit is contained in:
Denis Zharkov
2018-12-19 14:16:01 +03:00
parent be881442da
commit 2b40ecfd29
5 changed files with 39 additions and 2 deletions
@@ -0,0 +1,14 @@
// ULTRA_LIGHT_CLASSES
package test
expect interface Closable {
fun <caret>close()
}
expect class MyStream : Closable {}
open class MyImpl : Closable {
override fun close() {}
}
// REF: [testModule_Common] (in test.MyImpl).close()
@@ -0,0 +1,9 @@
package test
actual interface Closable {
fun close()
}
actual typealias MyStream = MyImpl
fun foo(): Any? = object : MyStream() {}