FIR IDE: fix property accessor resolution
For property access with implicit receiver, the resolved fir is a FirPropertyAccessExpression and hence we need to handle it in KtFirCallResolver.
This commit is contained in:
committed by
Ilya Kirillov
parent
1a22124c02
commit
a8ae704c0c
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// FILE: call.kt
|
||||
fun JavaClass.call() {
|
||||
<expr>foo</expr>
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
class JavaClass {
|
||||
int getFoo() { return 42; }
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = /JavaClass.getFoo(<dispatch receiver>: JavaClass): kotlin.Int
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// FILE: call.kt
|
||||
fun JavaClass.call() {
|
||||
<expr>foo</expr> = 42
|
||||
}
|
||||
|
||||
// FILE: JavaClass.java
|
||||
class JavaClass {
|
||||
private int foo = -1;
|
||||
int getFoo() { return foo; }
|
||||
void setFoo(int v) { foo = v; }
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 42 -> (v: kotlin.Int) }
|
||||
targetFunction = /JavaClass.setFoo(<dispatch receiver>: JavaClass, v: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
val i: Int = 1
|
||||
}
|
||||
|
||||
fun A.foo() {
|
||||
<expr>i</expr>
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <getter>(): kotlin.Int
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
var i: Int = 1
|
||||
}
|
||||
|
||||
fun A.foo() {
|
||||
<expr>i</expr> = 1
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (value: kotlin.Int) }
|
||||
targetFunction = <setter>(value: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Reference in New Issue
Block a user