[Tests] Convert diagnostics test for #KT-65555 to box test

This commit is contained in:
Kirill Rakhman
2024-02-15 13:42:17 +01:00
committed by Space Team
parent fd66e5d5b8
commit 365973f03a
18 changed files with 86 additions and 38 deletions
@@ -0,0 +1,11 @@
MODULE main
CLASS A.class
CLASS METADATA
K1
getSize()I
K2
---
K1
---
K2
size
+16
View File
@@ -0,0 +1,16 @@
// TARGET_BACKEND: JVM
// FULL_JDK
// ISSUE: KT-65555
// JVM_ABI_K1_K2_DIFF: KT-63828
interface MyCollection<E> : Collection<E>
interface MyList<E> : MyCollection<E>, List<E>
interface MyMutableList<E> : MyList<E>, MutableList<E>
class A(val delegate: ArrayList<String>) : MyMutableList<String>, MutableList<String> by delegate
fun box(): String {
val delegate = ArrayList<String>()
delegate.add("OK")
return A(delegate).get(0)
}