JVM IR: support noarg compiler plugin

#KT-41265 Fixed
This commit is contained in:
Alexander Udalov
2020-11-25 22:23:22 +01:00
parent a06bffc4b9
commit 25c228297a
21 changed files with 483 additions and 61 deletions
@@ -0,0 +1,20 @@
// WITH_RUNTIME
// INVOKE_INITIALIZERS
annotation class NoArg
@NoArg
class Test(val a: String) {
val lc = run {
class Local(val result: String)
Local("OK").result
}
val obj = object { val result = "OK" }.result
}
fun box(): String {
val t = Test::class.java.newInstance()
if (t.lc != "OK") return "Fail 1"
return t.obj
}