KTIJ-27434 [AA] Unwrap safe call expression when resolving implicit invoke calls
`FirSafeCallExpression` does not implement `FirResolvable`, so we need to unwrap it to correctly resolve calls like `foo?.bar()` when `bar` is a lambda with receiver parameter or a functional type property ^KTIJ-27434 Fixed
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Foo
|
||||
|
||||
val Foo.action: () -> Unit get() = {}
|
||||
|
||||
fun usage(foo: Foo) {
|
||||
foo.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test) val test.Foo.action: () -> kotlin.Unit
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Foo
|
||||
|
||||
val Foo.action: () -> Unit get() = {}
|
||||
|
||||
fun usage(foo: Foo?) {
|
||||
foo?.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test) val test.Foo.action: () -> kotlin.Unit
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class Foo
|
||||
|
||||
fun usage(foo: Foo, action: Foo.() -> Unit) {
|
||||
foo.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: action: test.Foo.() -> kotlin.Unit
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
class Foo
|
||||
|
||||
fun usage(foo: Foo?, action: Foo.() -> Unit) {
|
||||
foo?.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: action: test.Foo.() -> kotlin.Unit
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
val action: () -> Unit = {}
|
||||
}
|
||||
|
||||
fun usage(foo: Foo) {
|
||||
foo.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test.Foo) val action: () -> kotlin.Unit
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
class Foo {
|
||||
val action: () -> Unit = {}
|
||||
}
|
||||
|
||||
fun usage(foo: Foo?) {
|
||||
foo?.acti<caret>on()
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in test.Foo) val action: () -> kotlin.Unit
|
||||
Reference in New Issue
Block a user