FIR IDE: Add substitutor to KtCall
This commit is contained in:
committed by
Ilya Kirillov
parent
9f0f1781c9
commit
d2ed203528
+3
-2
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (vararg elements: T), 2 -> (vararg elements: T), 3 -> (vararg elements: T) }
|
||||
targetFunction = kotlin/arrayOf(vararg elements: T): kotlin.Array<T>
|
||||
argumentMapping = { 1 -> (vararg elements: kotlin.Int), 2 -> (vararg elements: kotlin.Int), 3 -> (vararg elements: kotlin.Int) }
|
||||
targetFunction = kotlin/arrayOf(vararg elements: kotlin.Int): kotlin.Array<kotlin.Int>
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol T=kotlin/Int}>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int) }
|
||||
targetFunction = /function(a: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /function(a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <A, B> A.function(a: B) {}
|
||||
|
||||
fun call() {
|
||||
"str".<expr>function(1)</expr>
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int) }
|
||||
targetFunction = /function(<extension receiver>: kotlin.String, a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol A=kotlin/String, FirTypeParameterSymbol B=kotlin/Int}>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), { s -> true } -> (b: kotlin.Function1<kotlin.String, kotlin.Boolean>) }
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.Function1<kotlin.String, kotlin.Boolean>): kotlin.Unit
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.Function1<kotlin.String, kotlin.Boolean>): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { "foo" -> (b: kotlin.String), 1 -> (a: kotlin.Int) }
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.String): kotlin.Unit
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.String): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), { s -> true } -> (b: kotlin.Function1<kotlin.String, kotlin.Boolean>) }
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.Function1<kotlin.String, kotlin.Boolean>): kotlin.Unit
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.Function1<kotlin.String, kotlin.Boolean>): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { args -> (vararg a: kotlin.Int) }
|
||||
targetFunction = /function(vararg a: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /function(vararg a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
fun <A, B> function(a: A, b: B) {}
|
||||
|
||||
fun call() {
|
||||
<expr>function(1, "")</expr>
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), "" -> (b: kotlin.String) }
|
||||
targetFunction = /function(a: kotlin.Int, b: kotlin.String): kotlin.Unit
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol A=kotlin/Int, FirTypeParameterSymbol B=kotlin/String}>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (vararg a: kotlin.Int), 2 -> (vararg a: kotlin.Int), 3 -> (vararg a: kotlin.Int) }
|
||||
targetFunction = /function(vararg a: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /function(vararg a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int) }
|
||||
targetFunction = /function(<receiver>: kotlin.String, a: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /function(<extension receiver>: kotlin.String, a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int) }
|
||||
targetFunction = /function(<receiver>: kotlin.String, a: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /function(<extension receiver>: kotlin.String, a: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 42 -> (i: kotlin.Int) }
|
||||
targetFunction = <constructor>(i: kotlin.Int): A
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <constructor>(): A
|
||||
targetFunction = <constructor>(): A
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <constructor>(): A
|
||||
targetFunction = <constructor>(): A
|
||||
substitutor = <empty substitutor>
|
||||
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), "foo" -> (b: kotlin.String) }
|
||||
targetFunction = /C.get(a: kotlin.Int, b: kotlin.String): kotlin.Boolean
|
||||
targetFunction = /C.get(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String): kotlin.Boolean
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int) }
|
||||
targetFunction = ERR<No value passed for parameter 'b', [/C.get(a: kotlin.Int, b: kotlin.String): kotlin.Boolean]>
|
||||
targetFunction = ERR<No value passed for parameter 'b', [/C.get(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String): kotlin.Boolean]>
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), "foo" -> (b: kotlin.String) }
|
||||
targetFunction = ERR<Too many arguments for public final operator fun /C.get(a: R|kotlin/Int|, b: R|kotlin/String|): R|kotlin/Boolean|, [/C.get(a: kotlin.Int, b: kotlin.String): kotlin.Boolean]>
|
||||
targetFunction = ERR<Too many arguments for public final operator fun /C.get(a: R|kotlin/Int|, b: R|kotlin/String|): R|kotlin/Boolean|, [/C.get(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String): kotlin.Boolean]>
|
||||
substitutor = <empty substitutor>
|
||||
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), "foo" -> (b: kotlin.String), false -> (value: kotlin.Boolean) }
|
||||
targetFunction = /C.set(a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit
|
||||
targetFunction = /C.set(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), false -> (value: kotlin.Boolean) }
|
||||
targetFunction = ERR<No value passed for parameter 'b', [/C.set(a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit]>
|
||||
targetFunction = ERR<No value passed for parameter 'b', [/C.set(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit]>
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (a: kotlin.Int), "foo" -> (b: kotlin.String), false -> (value: kotlin.Boolean) }
|
||||
targetFunction = ERR<Too many arguments for public final operator fun /C.set(a: R|kotlin/Int|, b: R|kotlin/String|, value: R|kotlin/Boolean|): R|kotlin/Unit|, [/C.set(a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit]>
|
||||
targetFunction = ERR<Too many arguments for public final operator fun /C.set(a: R|kotlin/Int|, b: R|kotlin/String|, value: R|kotlin/Boolean|): R|kotlin/Unit|, [/C.set(<dispatch receiver>: C, a: kotlin.Int, b: kotlin.String, value: kotlin.Boolean): kotlin.Unit]>
|
||||
substitutor = <empty substitutor>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (vararg elements: kotlin.Int), 2 -> (vararg elements: kotlin.Int), 3 -> (vararg elements: kotlin.Int) }
|
||||
targetFunction = kotlin/intArrayOf(vararg elements: kotlin.Int): kotlin.IntArray
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = /JavaClass.javaMethod(): kotlin.Unit
|
||||
targetFunction = /JavaClass.javaMethod(<dispatch receiver>: JavaClass): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = /JavaClass.getFoo(): kotlin.Int
|
||||
targetFunction = /JavaClass.getFoo(<dispatch receiver>: JavaClass): kotlin.Int
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = /JavaClass.getSub(): ft<JavaSubClass, JavaSubClass?>
|
||||
targetFunction = /JavaClass.getSub(<dispatch receiver>: JavaClass): ft<JavaSubClass, JavaSubClass?>
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 42 -> (v: kotlin.Int) }
|
||||
targetFunction = /JavaClass.setFoo(v: kotlin.Int): kotlin.Unit
|
||||
targetFunction = /JavaClass.setFoo(<dispatch receiver>: JavaClass, v: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = ERR<Setter value is missing, [/JavaClass.setFoo(v: kotlin.Int): kotlin.Unit]>
|
||||
targetFunction = ERR<Setter value is missing, [/JavaClass.setFoo(<dispatch receiver>: JavaClass, v: kotlin.Int): kotlin.Unit]>
|
||||
substitutor = <empty substitutor>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <getter>(): kotlin.Int
|
||||
substitutor = <empty substitutor>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = <getter>(): KtSubClass
|
||||
substitutor = <empty substitutor>
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 42 -> (value: kotlin.Int) }
|
||||
targetFunction = <setter>(value: kotlin.Int): kotlin.Unit
|
||||
substitutor = <empty substitutor>
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
interface A<T> {
|
||||
fun <R> foo(r: R)
|
||||
}
|
||||
|
||||
fun call(a: A<String>) {
|
||||
a.<expr>foo(1)</expr>
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 1 -> (r: kotlin.Int) }
|
||||
targetFunction = /A.foo(<dispatch receiver>: A<kotlin.String>, r: kotlin.Int): kotlin.Unit
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol R=kotlin/Int}>
|
||||
Vendored
+3
-2
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { 2 -> (other: B) }
|
||||
targetFunction = /to(<receiver>: A, other: B): A
|
||||
argumentMapping = { 2 -> (other: kotlin.Int) }
|
||||
targetFunction = /to(<extension receiver>: kotlin.Int, other: kotlin.Int): kotlin.Int
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol A=kotlin/Int, FirTypeParameterSymbol B=kotlin/Int}>
|
||||
Vendored
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = ERR<Too many arguments for public final fun /foo(): R|kotlin/Unit|, [/foo(): kotlin.Unit]>
|
||||
targetFunction = ERR<Too many arguments for public final fun /foo(): R|kotlin/Unit|, [/foo(): kotlin.Unit]>
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
KtFunctionalTypeVariableCall:
|
||||
target = x: kotlin.Function1<kotlin.Int, kotlin.String>
|
||||
argumentMapping = { 1 -> (p1: kotlin.Int) }
|
||||
targetFunction = kotlin/Function1.invoke(p1: kotlin.Int): kotlin.String
|
||||
targetFunction = kotlin/Function1.invoke(<dispatch receiver>: kotlin.Function1<kotlin.Int, kotlin.String>, p1: kotlin.Int): kotlin.String
|
||||
substitutor = <empty substitutor>
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
KtFunctionCall:
|
||||
argumentMapping = { }
|
||||
targetFunction = /invoke(<receiver>: kotlin.Int): kotlin.String
|
||||
targetFunction = /invoke(<extension receiver>: kotlin.Int): kotlin.String
|
||||
substitutor = <empty substitutor>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
interface Foo {
|
||||
operator fun <T> invoke(t: T)
|
||||
}
|
||||
|
||||
fun test(f: Foo) {
|
||||
<expr>f("")</expr>
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
KtVariableWithInvokeFunctionCall:
|
||||
target = f: Foo
|
||||
argumentMapping = { "" -> (t: kotlin.String) }
|
||||
targetFunction = /Foo.invoke(<dispatch receiver>: Foo, t: kotlin.String): kotlin.Unit
|
||||
substitutor = <map substitutor: {FirTypeParameterSymbol T=kotlin/String}>
|
||||
Reference in New Issue
Block a user