Files
kotlin-fork/compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt
T
2021-11-20 03:37:31 +03:00

33 lines
696 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// FIR status: wrong ABSTRACT_MEMBER_NOT_IMPLEMENTED, probably provoked by override mapping error
// TARGET_BACKEND: JVM
// FILE: J.java
public class J {
abstract static public class AImpl {
public char charAt(int index) {
return 'A';
}
public final int length() { return 56; }
}
public static class A extends AImpl implements CharSequence {
public CharSequence subSequence(int start, int end) {
return null;
}
}
}
// FILE: test.kt
class X : J.A()
fun box(): String {
val x = X()
if (x.length != 56) return "fail 1"
if (x[0] != 'A') return "fail 2"
return "OK"
}