Tests: do not report backend diagnostics if there's frontend error

In most affected tests, the backend diagnostic such as "conflicting JVM
signature" or "accidental override" is directly caused by some already
existing error reported by frontend, so it doesn't make sense to check
backend diagnostics there.

Tests where that was not the case were moved/copied to
`testsWithJvmBackend`.
This commit is contained in:
Alexander Udalov
2024-03-11 22:22:03 +01:00
committed by Space Team
parent dca6c21d7f
commit 55f9f74d5c
38 changed files with 396 additions and 397 deletions
+5 -5
View File
@@ -49,12 +49,12 @@ abstract class MyAbstractClass1 : MyTrait<Int>, MyAbstractClass<String>() {
abstract class MyLegalAbstractClass1 : MyTrait<Int>, MyAbstractClass<String>() {}
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class MyIllegalClass2<!><T>(t : T) : MyTrait<Int>, MyAbstractClass<Int>() {
<!ACCIDENTAL_OVERRIDE!>fun foo(t: T)<!> = t
<!ACCIDENTAL_OVERRIDE!>fun bar(t: T)<!> = t
fun foo(t: T) = t
fun bar(t: T) = t
<!CONFLICTING_OVERLOADS!>val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>R<!>> pr : T<!> = t
}
abstract class MyLegalAbstractClass2<T>(t : T) : MyTrait<Int>, MyAbstractClass<Int>() {
<!ACCIDENTAL_OVERRIDE!>fun foo(t: T)<!> = t
<!ACCIDENTAL_OVERRIDE!>fun bar(t: T)<!> = t
fun foo(t: T) = t
fun bar(t: T) = t
<!CONFLICTING_OVERLOADS!>val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>R<!>> pr : T<!> = t
}
}
@@ -17,4 +17,4 @@ public abstract class B implements A<String> {
public class C extends B implements A<String> {}
// FILE: Main.kt
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class <!CONFLICTING_INHERITED_JVM_DECLARATIONS!>X<!><!> : C() // false positive in K1, OK in K2
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class X<!> : C() // false positive in K1, OK in K2