Change Signature: Support conversion between extension and non-extension functions
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
class A(val k: Int) {
|
||||
fun String.foo(x: X, k: Int): Boolean {
|
||||
return x.k + length() - k + this@A.k/2 > 0
|
||||
}
|
||||
|
||||
fun test() {
|
||||
"1".foo(X(0), 2)
|
||||
}
|
||||
}
|
||||
|
||||
class X(val k: Int)
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
|
||||
fun test() {
|
||||
with(A(3)) {
|
||||
"1".foo(X(0), 2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user