K2: reproduce KT-65410 in diagnostic/BB tests
This commit is contained in:
committed by
Space Team
parent
b6c805bbb6
commit
ba374a3978
@@ -0,0 +1,49 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// ISSUE: KT-65410
|
||||
|
||||
// FILE: Java1.java
|
||||
import kotlin.collections.AbstractMutableList;
|
||||
|
||||
public class Java1 extends AbstractMutableList<Integer> {
|
||||
int size = 0;
|
||||
|
||||
@Override
|
||||
public int getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(int i, Integer integer) {
|
||||
size++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer removeAt(int i) {
|
||||
size--;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer get(int index) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer set(int i, Integer integer) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
class A : Java1()
|
||||
|
||||
fun box(): String {
|
||||
val list = A()
|
||||
list.add(1)
|
||||
list.removeAt(0)
|
||||
if (list.isNotEmpty()) return "Not empty"
|
||||
if (list.size != 0) return "Size = ${list.size}"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user