[FIR] DATA_CLASS_OVERRIDE_CONFLICT diagnostic
This commit is contained in:
committed by
teamcityserver
parent
b44785c24e
commit
b36f8ed8f5
@@ -1,13 +0,0 @@
|
||||
interface SuperInterface
|
||||
|
||||
open class SuperClass
|
||||
|
||||
<!INCOMPATIBLE_MODIFIERS!>abstract<!> <!INCOMPATIBLE_MODIFIERS!>data<!> class Base(val x: Int)
|
||||
|
||||
class Derived: Base(42)
|
||||
|
||||
data class Nasty(val z: Int, val y: Int): Base(z)
|
||||
|
||||
data class Complex(val y: Int): SuperInterface, SuperClass()
|
||||
|
||||
data class SubData(val sss: String) : <!FINAL_SUPERTYPE!>Complex<!>(42)
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
interface SuperInterface
|
||||
|
||||
open class SuperClass
|
||||
|
||||
Vendored
+1
-1
@@ -2,4 +2,4 @@ interface T {
|
||||
final fun component1(): Int = 42
|
||||
}
|
||||
|
||||
data class A(val x: Int) : T
|
||||
<!DATA_CLASS_OVERRIDE_CONFLICT!>data<!> class A(val x: Int) : T
|
||||
|
||||
+4
-4
@@ -5,10 +5,10 @@ interface A<T> {
|
||||
fun bar(x: T!!): T!!
|
||||
}
|
||||
|
||||
//interface B<T1> : A<T1> {
|
||||
// override fun foo(x: T1): T1
|
||||
// override fun bar(x: T1!!): T1!!
|
||||
//}
|
||||
interface B<T1> : A<T1> {
|
||||
override fun foo(x: T1): T1
|
||||
override fun bar(x: T1!!): T1!!
|
||||
}
|
||||
|
||||
interface C<T2> : A<T2> {
|
||||
override fun foo(x: T2!!): T2!!
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// fir reports NOTHING_TO_OVERRIDE because it keeps only one definition of p.Base
|
||||
// MODULE: m1
|
||||
// FILE: x.kt
|
||||
package p
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ open class NotAllowed
|
||||
|
||||
class Derived: Base(42)
|
||||
|
||||
data class Nasty(val z: Int, val y: Int): Base(z)
|
||||
<!DATA_CLASS_OVERRIDE_CONFLICT!>data<!> class Nasty(val z: Int, val y: Int): Base(z)
|
||||
|
||||
data class Complex(val y: Int): Allowed, NotAllowed()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user