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