FIR IDE: add APIs about FunctionClassKind
This commit is contained in:
committed by
Ilya Kirillov
parent
d029e84b96
commit
6d150fb7a5
@@ -0,0 +1,7 @@
|
||||
fun <T, R> foo(p: T, mapper : (T) -> R): R {
|
||||
mapper(p)
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo(1, x<caret>y)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
expression: xy
|
||||
expected type: (T) -> R
|
||||
functionClassKind: Function
|
||||
@@ -0,0 +1,11 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KFunction1
|
||||
|
||||
fun <T, R> foo(p: T, mapper : (T) -> R): R {
|
||||
mapper(p)
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo(1, x<caret>y as KFunction1<Int, String>)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
expression: xy
|
||||
expected type: (kotlin.Int) -> kotlin.String
|
||||
functionClassKind: KFunction
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KSuspendFunction0
|
||||
|
||||
fun foo(pause : suspend () -> Unit) {
|
||||
pause()
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo(x<caret>y as KSuspendFunction0<Unit>)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expression: xy
|
||||
expected type: suspend () -> kotlin.Unit
|
||||
functionClassKind: KSuspendFunction
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun foo(pause : suspend () -> Unit) {
|
||||
pause()
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo(x<caret>y)
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
expression: xy
|
||||
expected type: suspend () -> kotlin.Unit
|
||||
functionClassKind: SuspendFunction
|
||||
Reference in New Issue
Block a user