JS: fix behaviour of char-returning functions with multiple inheritance

See KT-19772
This commit is contained in:
Alexey Andreev
2017-09-26 12:55:53 +03:00
parent 13d6e96c2f
commit 46526db8f0
17 changed files with 401 additions and 17 deletions
@@ -0,0 +1,25 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class A {
fun get(index: Int): Char = '*'
}
abstract class <!WRONG_MULTIPLE_INHERITANCE!>B<!> : A(), 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
}