Files
kotlin-fork/js/js.translator/testData/box/expression/cast/castToKProperty0.kt
T
2016-09-29 12:00:40 +03:00

14 lines
320 B
Kotlin
Vendored

package foo
import kotlin.reflect.KProperty0
val x = 23
fun box(): String {
assertEquals(true, (::x as Any) is KProperty0<*>)
assertEquals(23, ((::x as Any) as KProperty0<Any>)())
assertEquals(false, (23 as Any) is KProperty0<*>)
assertEquals(false, ({ x } as Any) is KProperty0<*>)
return "OK"
}