Change Signature: Property support

#KT-6599 Fixed
This commit is contained in:
Alexey Sedunov
2015-06-24 14:17:23 +03:00
parent c96349f42b
commit 2ff63d37c2
60 changed files with 1431 additions and 377 deletions
@@ -0,0 +1,26 @@
public inline fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
open class A {
open var String.<caret>p: Int = 1
}
class B: A() {
override var String.p: Int = 2
}
fun test() {
with(A()) {
val t = "".p
"".p = 1
}
with(B()) {
val t = "".p
"".p = 2
}
with(J()) {
val t = getP("")
setP("", 3)
}
}