Files
kotlin-fork/compiler/testData/codegen/box/differentDependencyVersion/kt51194_javaAndKotlin.kt
T
Ilya Chernikov 78ca733c38 FIR JS: add K2 variants of all other JS tests
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00

31 lines
703 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// ISSUE: KT-51194
// DIAGNOSTICS: +CONFLICTING_INHERITED_MEMBERS_WARNING
// IGNORE_BACKEND_K2: JVM_IR, JS_IR
// FIR status: FIR correctly reports CONFLICTING_INHERITED_MEMBERS, so this test should not pass design
// For details see related issue
// MODULE: coreLib_1
// FILE: Base.java
public interface Base {
Object foo();
}
// MODULE: lib(coreLib_1)
// FILE: Derived.kt
abstract class Derived : Base {
override fun foo(): Any? = null
}
// MODULE: coreLib_2
// FILE: Base.java
public interface Base {
<T> T foo();
}
// MODULE: main(coreLib_2, lib)
// FILE: main.kt
<!CONFLICTING_INHERITED_MEMBERS_WARNING!>class Implementation<!> : Derived()
fun box() = "OK"