Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt
T
2023-09-18 12:13:02 +00:00

29 lines
683 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class A {
fun get(index: Int): Char = '*'
}
typealias TA = A
abstract class <!WRONG_MULTIPLE_INHERITANCE!>B<!> : A(), CharSequence
abstract class <!WRONG_MULTIPLE_INHERITANCE!>B2<!> : TA(), CharSequence
interface I {
fun nextChar(): Char
}
abstract class <!WRONG_MULTIPLE_INHERITANCE!>C<!> : CharIterator(), I {
override fun nextChar(): Char = '*'
}
class <!WRONG_MULTIPLE_INHERITANCE!>CC(val s: CharSequence)<!> : CharSequence by s, MyCharSequence {}
interface MyCharSequence {
val length: Int
operator fun get(index: Int): Char
fun subSequence(startIndex: Int, endIndex: Int): CharSequence
}