Files
Alexander Udalov 324d2e042a Tests: do not report backend diagnostics in diagnostic tests
There's a separate test data directory `testsWithJvmBackend` with a
runner that properly invokes the JVM backend and reports diagnostics
from it. All tests where JVM diagnostic presence/absence is important
were copied/moved there in this and previous commits.

The problem with the code removed in this commit is that it invoked some
parts of the _old JVM backend_ and old light classes, which is very far
from what users see in the production compiler at this point. This led
to real issues where we implemented incorrect behavior in K2 based on
the misleading diagnostic report from the K1 test.

The diagnostic in `triangleWithFlexibleTypeAndSubstitution4.kt` was
removed, but there's a copy of this test in `codegen/box/javaInterop`
which fails for K2 (KT-66529).

The diagnostic in `intersectionWithMappedSignature.kt` was removed and
that is OK because at this point CONFLICTING_JVM_DECLARATIONS there
seems like a bug in the old JVM backend.
2024-03-14 12:38:48 +00:00

38 lines
693 B
Kotlin
Vendored

// FIR_IDENTICAL
// FULL_JDK
// SCOPE_DUMP: B1:remove, B2:remove
// FILE: Java1.java
public interface Java1 {
Boolean remove(Integer element);
}
// FILE: testRemove.kt
import java.util.*
class B1 : ArrayList<Int>(), Java1 {
override fun remove(element: Int?): Boolean {
return false
}
}
class B2 : ArrayList<Int>(), Java1 {
}
// FILE: Java2.java
public interface Java2 {
Character get(Integer i);
}
// FILE: MyString.java
public abstract class MyString implements CharSequence {
@Override
public char charAt(int i) {
return 'c';
}
}
// FILE: testRenamed.kt
abstract class B3 : MyString(), Java2 {
override fun get(i: Int?): Char? = null
}