"Convert reference to lambda" intention: handle extension function reference with extension function call
#KT-35558 Fixed
This commit is contained in:
committed by
igoriakovlev
parent
9ff7539ff0
commit
b1e8238ea2
@@ -0,0 +1,9 @@
|
||||
fun func(a: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: (Int) -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo(::func<caret>)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun func(a: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: (Int) -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo { func(it) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fun func(a: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: Int.() -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo(::func<caret>)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun func(a: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: Int.() -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo { func(this) }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fun func2(a: Int, b: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: Int.(Int) -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo(::func2<caret>)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun func2(a: Int, b: Int) {
|
||||
}
|
||||
|
||||
fun Int.foo(block: Int.(Int) -> Unit) {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
42.foo { b -> func2(this, b) }
|
||||
}
|
||||
Reference in New Issue
Block a user