[FIR] Resolve receiver in qualified expressions with no selector
In qualified expression like `foo().`, selector expression is null. Because of that the whole expression was marked as an error FIR expression, and `foo()` part was not resolved at all (including arguments and everything else). This commit fixes the problem by providing receiver's FIR expression as an underlying expression for error FIR expression. That way it will be seen by all resolve transformers and will be successfully resolved. ^KTIJ-21484 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
package testing
|
||||
|
||||
interface Foo
|
||||
|
||||
val otherFoo: Foo = makeFoo()
|
||||
|
||||
fun makeFoo(): Foo = Foo()
|
||||
|
||||
fun test() {
|
||||
<caret>makeFoo().
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in testing) fun makeFoo(): testing.Foo
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package testing
|
||||
|
||||
interface Foo
|
||||
|
||||
val otherFoo: Foo = makeFoo()
|
||||
|
||||
fun makeFoo(action: () -> Unit): Foo = Foo()
|
||||
|
||||
fun test() {}
|
||||
|
||||
fun test() {
|
||||
makeFoo {
|
||||
<caret>test()
|
||||
}.
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in testing) fun test()
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
package testing
|
||||
|
||||
interface Foo
|
||||
|
||||
val otherFoo: Foo = makeFoo()
|
||||
|
||||
fun makeFoo(): Foo = Foo()
|
||||
|
||||
fun test() {
|
||||
<caret>makeFoo()?.
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in testing) fun makeFoo(): testing.Foo
|
||||
Reference in New Issue
Block a user