FIR: Fix exception caused by empty supertypes of java.lang.Object

This commit is contained in:
Denis.Zharkov
2021-10-04 18:23:37 +03:00
committed by TeamCityServer
parent 7eb0fd4762
commit 9d9f191f51
6 changed files with 49 additions and 4 deletions
@@ -0,0 +1,14 @@
FILE: UsingObject.kt
public final class A : R|kotlin/Any| {
public constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
public final fun foo(): R|A?| {
^foo Null(null)
}
public final fun main(): R|kotlin/Unit| {
lval w: R|kotlin/Any| = R|/foo|() ?: Q|java/lang|.R|java/lang/Object.Object|()
R|<local>/w|.R|kotlin/Any.hashCode|()
}
@@ -0,0 +1,8 @@
class A
fun foo(): A? = null
fun main() {
val w = foo() ?: java.lang.Object()
w.hashCode()
}