f38c0cf348
Similarly to FIR diagnostic tests. This commit enable all available test data and check the reported error messages by FIR. This helps identify some issues in formatting of FIR diagnostics. The changes on the test file are mechanically generated. Failed tests are disabled with `// IGNORE_FIR` and are re-enabled in the second commit.
36 lines
1.0 KiB
Kotlin
Vendored
36 lines
1.0 KiB
Kotlin
Vendored
interface MyTrait<T> {
|
|
fun foo(t: T) : T
|
|
}
|
|
|
|
abstract class MyAbstractClass<T> {
|
|
abstract fun bar(t: T) : T
|
|
}
|
|
|
|
open class MyGenericClass<T> : MyTrait<T>, MyAbstractClass<T>() {
|
|
override fun foo(t: T) = t
|
|
override fun bar(t: T) = t
|
|
}
|
|
|
|
class MyChildClass : MyGenericClass<Int>() {}
|
|
class MyChildClass1<T> : MyGenericClass<T>() {}
|
|
class MyChildClass2<T> : MyGenericClass<T>() {
|
|
fun foo(t: T) = t
|
|
override fun bar(t: T) = t
|
|
}
|
|
|
|
open class MyClass : MyTrait<Int>, MyAbstractClass<String>() {
|
|
override fun foo(t: Int) = t
|
|
override fun bar(t: String) = t
|
|
}
|
|
|
|
class MyIllegalGenericClass1<T> : MyTrait<T>, MyAbstractClass<T>() {}
|
|
class MyIllegalGenericClass2<T, R> : MyTrait<T>, MyAbstractClass<R>() {
|
|
override fun foo(r: R) = r
|
|
}
|
|
class MyIllegalClass1 : MyTrait<Int>, MyAbstractClass<String>() {}
|
|
|
|
class MyIllegalClass2<T> : MyTrait<Int>, MyAbstractClass<Int>() {
|
|
fun foo(t: T) = t
|
|
fun bar(t: T) = t
|
|
}
|