Rename and implement KProperty.accessible -> KCallable.isAccessible

This commit is contained in:
Alexander Udalov
2015-07-23 23:10:39 +03:00
parent 8f0885ca03
commit 9c4ba711b8
12 changed files with 107 additions and 72 deletions
@@ -0,0 +1,15 @@
import kotlin.reflect.jvm.*
enum class E
fun box(): String {
try {
val c = E::class.constructors.single()
c.isAccessible = true
c.call()
return "Fail: constructing an enum class should not be allowed"
}
catch (e: Throwable) {
return "OK"
}
}