Change Signature: Support conversion between extension and non-extension functions

This commit is contained in:
Alexey Sedunov
2014-12-19 20:40:17 +03:00
parent b31da56e09
commit 96866a108f
82 changed files with 1425 additions and 64 deletions
@@ -0,0 +1,19 @@
class A(val k: Int) {
fun <caret>foo(x: X, s: String, k: Int): Boolean {
return x.k + s.length() - k + this.k/2 > 0
}
fun test() {
foo(X(0), "1", 2)
}
}
class X(val k: Int)
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
fun test() {
with(A(3)) {
foo(X(0), "1", 2)
}
}