Add tests for issues fixed in JVM IR

Note that KT-30696 is fixed only in the single-module case, and KT-42012
is not fixed fully (see KT-44855).

 #KT-30041
 #KT-30629
 #KT-30696
 #KT-30933
 #KT-32351
 #KT-32749
 #KT-38849
 #KT-42012
 #KT-42990
 #KT-44234
 #KT-44529
 #KT-44631
 #KT-44647
This commit is contained in:
Alexander Udalov
2021-02-03 15:03:30 +01:00
parent 17fc10a8af
commit 73aa465ee9
31 changed files with 826 additions and 0 deletions
@@ -0,0 +1,36 @@
// IGNORE_BACKEND: JVM
// TARGET_BACKEND: JVM
// MODULE: lib
// FILE: test/Parent.java
package test;
public class Parent {
protected String qqq = "";
public String getQqq() {
return qqq;
}
}
// MODULE: main(lib)
// FILE: 1.kt
import test.Parent
open class Child : Parent() {
inner class QQQ {
fun z(x: Parent?) {
x as Child
val q = x.qqq
x.qqq = q + "OK"
}
}
}
fun box(): String {
val c = Child()
val d = c.QQQ()
d.z(c)
return c.qqq
}