NoArg: Initialize properties in noarg constructor (KT-16692)

This commit is contained in:
Yan Zhulanow
2017-05-04 17:55:35 +03:00
parent eba5baa7ff
commit 254e8156ac
13 changed files with 243 additions and 140 deletions
+15
View File
@@ -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"
}
}