NoArg: Initialize properties in noarg constructor (KT-16692)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
annotation class NoArg
|
||||
|
||||
@NoArg
|
||||
class Test(val a: String)
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
Test::class.java.newInstance()
|
||||
return "OK"
|
||||
} catch (_: Throwable) {
|
||||
return "Fail"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user