Added tests.

This commit is contained in:
Igor Chevdar
2017-02-28 12:51:28 +03:00
parent 94fd86f906
commit f534616e19
5 changed files with 94 additions and 0 deletions
@@ -0,0 +1,18 @@
import kotlin.reflect.KProperty
fun foo(): Int {
class Delegate {
operator fun getValue(receiver: Any?, p: KProperty<*>): Int {
println(p.name)
return 42
}
}
val x: Int by Delegate()
return x
}
fun main(args: Array<String>) {
println(foo())
}