JVM IR: support noarg compiler plugin
#KT-41265 Fixed
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user