K2: for Java source override, don't compare return types in override checker

#KT-57044 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-06-15 15:00:17 +02:00
committed by Space Team
parent 7d7256536c
commit 0c61ce61c3
9 changed files with 122 additions and 1 deletions
@@ -0,0 +1,14 @@
FILE: K.kt
public open class K : R|kotlin/Any| {
public constructor(): R|K| {
super<R|kotlin/Any|>()
}
public open fun test(): R|kotlin/Unit| {
^test Q|kotlin/Unit|
}
}
public final fun jk(): R|kotlin/Unit| {
R|/JK.JK|().R|/JK.test|()
}
@@ -0,0 +1,18 @@
// FILE: JK.java
public class JK extends K {
@Override
public void test() {
}
}
// FILE: K.kt
open class K {
open fun test() = Unit
}
fun jk() {
JK().test()
}
@@ -0,0 +1,14 @@
FILE: K.kt
public final fun jk(): R|kotlin/Unit| {
^jk R|/JK.JK|().R|/JK.test|()
}
public open class K : R|kotlin/Any| {
public constructor(): R|K| {
super<R|kotlin/Any|>()
}
public open fun test(): R|kotlin/Unit| {
^test Q|kotlin/Unit|
}
}
@@ -0,0 +1,16 @@
// FILE: JK.java
public class JK extends K {
@Override
public void test() {
}
}
// FILE: K.kt
fun jk() = JK().test()
open class K {
open fun test() = Unit
}