FIR IDE: use KtVariableWithInvokeFunctionCall for extension invoke
This commit is contained in:
committed by
Ilya Kirillov
parent
c19ed07fd1
commit
9ca8d39240
+1
-1
@@ -1,5 +1,5 @@
|
||||
operator fun Int.invoke(): String {}
|
||||
|
||||
fun call(x: kotlin.int) {
|
||||
fun call(x: kotlin.Int) {
|
||||
<expr>x()</expr>
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
KtFunctionCall:
|
||||
KtVariableWithInvokeFunctionCall:
|
||||
target = x: kotlin.Int
|
||||
argumentMapping = { }
|
||||
targetFunction = /invoke(<extension receiver>: kotlin.Int): kotlin.String
|
||||
substitutor = <empty substitutor>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
interface Foo
|
||||
|
||||
operator fun <T> Foo.invoke(t: T) {}
|
||||
|
||||
fun test(f: Foo) {
|
||||
<expr>f("")</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtVariableWithInvokeFunctionCall:
|
||||
target = f: Foo
|
||||
argumentMapping = { "" -> (t: kotlin.String) }
|
||||
targetFunction = /invoke(<extension receiver>: Foo, t: kotlin.String): kotlin.Unit
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol T=kotlin/String}>
|
||||
Reference in New Issue
Block a user