Convert to scope function: Also convert call expression
#KT-28698 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
f15c8f78fa
commit
bd467f39d6
@@ -0,0 +1,14 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo {
|
||||
fun foo(i: Int) {}
|
||||
}
|
||||
|
||||
fun bar(i: Int, f: Foo) {}
|
||||
|
||||
fun test(f: Foo) {
|
||||
val f2 = Foo()
|
||||
f.foo(1)<caret>
|
||||
bar(2, f)
|
||||
bar(3, f2)
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
class Foo {
|
||||
fun foo(i: Int) {}
|
||||
}
|
||||
|
||||
fun bar(i: Int, f: Foo) {}
|
||||
|
||||
fun test(f: Foo) {
|
||||
val f2 = Foo()
|
||||
with(f) {
|
||||
foo(1)
|
||||
bar(2, this)
|
||||
}
|
||||
bar(3, f2)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// WITH_RUNTIME
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
class Foo {
|
||||
fun foo(i: Int) {}
|
||||
}
|
||||
|
||||
fun bar(i: Int, f: Foo) {}
|
||||
|
||||
fun test(f: Foo) {
|
||||
f.foo(1)
|
||||
bar(2, f)<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user