[FIR] Check for isFun flag in SAM resolution
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
// TODO: This interface must be marked as "fun" ones that modifier is supported
|
fun interface MyRunnable {
|
||||||
interface MyRunnable {
|
|
||||||
fun foo(x: Int): Boolean
|
fun foo(x: Int): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,20 @@
|
|||||||
// TODO: These interfaces must be marked as "fun" ones that modifier is supported
|
fun interface MyRunnable {
|
||||||
interface MyRunnable {
|
|
||||||
fun foo(x: Int): Boolean
|
fun foo(x: Int): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface WithProperty {
|
fun interface WithProperty {
|
||||||
val x: Int
|
val x: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TwoAbstract : MyRunnable {
|
fun interface TwoAbstract : MyRunnable {
|
||||||
fun bar()
|
fun bar()
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Super {
|
fun interface Super {
|
||||||
fun foo(x: Int): Any
|
fun foo(x: Int): Any
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Derived : Super {
|
fun interface Derived : Super {
|
||||||
override fun foo(x: Int): Boolean
|
override fun foo(x: Int): Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
interface MySam {
|
fun interface MySam {
|
||||||
fun run(x: String): Int
|
fun run(x: String): Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Vendored
+124
-71
@@ -5,103 +5,156 @@ digraph plusAssignWithLambdaInRhs_kt {
|
|||||||
|
|
||||||
subgraph cluster_0 {
|
subgraph cluster_0 {
|
||||||
color=red
|
color=red
|
||||||
0 [label="Enter function plusAssign" style="filled" fillcolor=red];
|
0 [label="Enter function test" style="filled" fillcolor=red];
|
||||||
subgraph cluster_1 {
|
subgraph cluster_1 {
|
||||||
color=blue
|
color=blue
|
||||||
1 [label="Enter block"];
|
1 [label="Enter block"];
|
||||||
2 [label="Exit block"];
|
2 [label="Const: Null(null)"];
|
||||||
|
3 [label="Check not null: Null(null)!!"];
|
||||||
|
4 [label="Variable declaration: lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>|"];
|
||||||
|
5 [label="Access variable R|<local>/list|"];
|
||||||
|
6 [label="Postponed enter to lambda"];
|
||||||
|
subgraph cluster_2 {
|
||||||
|
color=blue
|
||||||
|
11 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_3 {
|
||||||
|
color=blue
|
||||||
|
12 [label="Enter block"];
|
||||||
|
13 [label="Access variable R|<local>/it|"];
|
||||||
|
14 [label="Exit block"];
|
||||||
|
}
|
||||||
|
15 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
7 [label="Postponed exit from lambda"];
|
||||||
|
8 [label="Function call: R|<local>/list|.R|kotlin/collections/plusAssign|<R|(kotlin/String) -> kotlin/String|>(...)"];
|
||||||
|
9 [label="Exit block"];
|
||||||
}
|
}
|
||||||
3 [label="Exit function plusAssign" style="filled" fillcolor=red];
|
10 [label="Exit function test" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
0 -> {1};
|
0 -> {1};
|
||||||
1 -> {2};
|
1 -> {2};
|
||||||
2 -> {3};
|
2 -> {3};
|
||||||
|
3 -> {4};
|
||||||
subgraph cluster_2 {
|
|
||||||
color=red
|
|
||||||
4 [label="Enter function plus" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_3 {
|
|
||||||
color=blue
|
|
||||||
5 [label="Enter block"];
|
|
||||||
6 [label="Access variable this@R|/plus|"];
|
|
||||||
7 [label="Jump: ^plus this@R|/plus|"];
|
|
||||||
8 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
9 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
10 [label="Exit function plus" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
4 -> {5};
|
4 -> {5};
|
||||||
5 -> {6};
|
5 -> {6};
|
||||||
6 -> {7};
|
6 -> {11};
|
||||||
7 -> {10};
|
6 -> {7} [color=red];
|
||||||
7 -> {8} [style=dotted];
|
7 -> {8};
|
||||||
8 -> {9} [style=dotted];
|
8 -> {9};
|
||||||
9 -> {10} [style=dotted];
|
9 -> {10};
|
||||||
|
11 -> {15 12};
|
||||||
subgraph cluster_4 {
|
|
||||||
color=red
|
|
||||||
11 [label="Enter function test" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_5 {
|
|
||||||
color=blue
|
|
||||||
12 [label="Enter block"];
|
|
||||||
13 [label="Const: Null(null)"];
|
|
||||||
14 [label="Check not null: Null(null)!!"];
|
|
||||||
15 [label="Variable declaration: lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>|"];
|
|
||||||
16 [label="Access variable R|<local>/list|"];
|
|
||||||
17 [label="Postponed enter to lambda"];
|
|
||||||
subgraph cluster_6 {
|
|
||||||
color=blue
|
|
||||||
22 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_7 {
|
|
||||||
color=blue
|
|
||||||
23 [label="Enter block"];
|
|
||||||
24 [label="Access variable R|<local>/it|"];
|
|
||||||
25 [label="Exit block"];
|
|
||||||
}
|
|
||||||
26 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
18 [label="Postponed exit from lambda"];
|
|
||||||
19 [label="Function call: R|<local>/list|.R|/plusAssign|<R|(kotlin/String) -> kotlin/String|>(...)"];
|
|
||||||
20 [label="Exit block"];
|
|
||||||
}
|
|
||||||
21 [label="Exit function test" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
11 -> {12};
|
|
||||||
12 -> {13};
|
12 -> {13};
|
||||||
13 -> {14};
|
13 -> {14};
|
||||||
14 -> {15};
|
14 -> {15};
|
||||||
15 -> {16};
|
15 -> {7} [color=green];
|
||||||
16 -> {17};
|
15 -> {11} [color=green style=dashed];
|
||||||
17 -> {18 22};
|
|
||||||
|
subgraph cluster_4 {
|
||||||
|
color=red
|
||||||
|
16 [label="Enter class A" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_5 {
|
||||||
|
color=blue
|
||||||
|
18 [label="Enter property" style="filled" fillcolor=red];
|
||||||
|
19 [label="Access variable R|<local>/executor|"];
|
||||||
|
20 [label="Exit property" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
17 [label="Exit class A" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
16 -> {18} [color=green];
|
||||||
18 -> {19};
|
18 -> {19};
|
||||||
19 -> {20};
|
19 -> {20};
|
||||||
20 -> {21};
|
20 -> {17} [color=green];
|
||||||
|
|
||||||
|
subgraph cluster_6 {
|
||||||
|
color=red
|
||||||
|
21 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||||
|
22 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||||
|
23 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
21 -> {22};
|
||||||
22 -> {23};
|
22 -> {23};
|
||||||
23 -> {24};
|
|
||||||
|
subgraph cluster_7 {
|
||||||
|
color=red
|
||||||
|
24 [label="Enter function getter" style="filled" fillcolor=red];
|
||||||
|
25 [label="Exit function getter" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
24 -> {25};
|
24 -> {25};
|
||||||
25 -> {26};
|
|
||||||
|
|
||||||
subgraph cluster_8 {
|
subgraph cluster_8 {
|
||||||
color=red
|
color=red
|
||||||
27 [label="Enter function listOf" style="filled" fillcolor=red];
|
26 [label="Enter function postpone" style="filled" fillcolor=red];
|
||||||
subgraph cluster_9 {
|
subgraph cluster_9 {
|
||||||
color=blue
|
color=blue
|
||||||
28 [label="Enter block"];
|
27 [label="Enter block"];
|
||||||
29 [label="Const: Null(null)"];
|
28 [label="Function call: R|kotlin/collections/mutableListOf|<R|() -> kotlin/Unit|>()"];
|
||||||
30 [label="Check not null: Null(null)!!"];
|
29 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList<kotlin/Function0<kotlin/Unit>>|"];
|
||||||
31 [label="Jump: ^listOf Null(null)!!"];
|
30 [label="Postponed enter to lambda"];
|
||||||
32 [label="Stub" style="filled" fillcolor=gray];
|
subgraph cluster_10 {
|
||||||
33 [label="Exit block" style="filled" fillcolor=gray];
|
color=blue
|
||||||
}
|
37 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||||
34 [label="Exit function listOf" style="filled" fillcolor=red];
|
subgraph cluster_11 {
|
||||||
|
color=blue
|
||||||
|
38 [label="Enter block"];
|
||||||
|
39 [label="Access variable R|<local>/queue|"];
|
||||||
|
40 [label="Postponed enter to lambda"];
|
||||||
|
subgraph cluster_12 {
|
||||||
|
color=blue
|
||||||
|
45 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_13 {
|
||||||
|
color=blue
|
||||||
|
46 [label="Enter block"];
|
||||||
|
47 [label="Function call: R|<local>/computation|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|()"];
|
||||||
|
48 [label="Function call: R|<local>/resolve|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(...)"];
|
||||||
|
49 [label="Exit block"];
|
||||||
|
}
|
||||||
|
50 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
41 [label="Postponed exit from lambda"];
|
||||||
|
42 [label="Function call: R|<local>/queue|.R|kotlin/collections/plusAssign|<R|() -> kotlin/Unit|>(...)"];
|
||||||
|
43 [label="Exit block"];
|
||||||
|
}
|
||||||
|
44 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
31 [label="Postponed exit from lambda"];
|
||||||
|
32 [label="Function call: R|/A.A|<R|T|>(...)"];
|
||||||
|
33 [label="Jump: ^postpone R|/A.A|<R|T|>(<L> = A@fun <anonymous>(resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||||
|
R|<local>/queue|.R|kotlin/collections/plusAssign|<R|() -> kotlin/Unit|>(A@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||||
|
R|<local>/resolve|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/computation|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|())
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)"];
|
||||||
|
34 [label="Stub" style="filled" fillcolor=gray];
|
||||||
|
35 [label="Exit block" style="filled" fillcolor=gray];
|
||||||
|
}
|
||||||
|
36 [label="Exit function postpone" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
26 -> {27};
|
||||||
27 -> {28};
|
27 -> {28};
|
||||||
28 -> {29};
|
28 -> {29};
|
||||||
29 -> {30};
|
29 -> {30};
|
||||||
30 -> {31};
|
30 -> {31 37};
|
||||||
31 -> {34};
|
31 -> {32};
|
||||||
31 -> {32} [style=dotted];
|
32 -> {33};
|
||||||
32 -> {33} [style=dotted];
|
33 -> {36};
|
||||||
33 -> {34} [style=dotted];
|
33 -> {34} [style=dotted];
|
||||||
|
34 -> {35} [style=dotted];
|
||||||
|
35 -> {36} [style=dotted];
|
||||||
|
37 -> {38};
|
||||||
|
38 -> {39};
|
||||||
|
39 -> {40};
|
||||||
|
40 -> {45};
|
||||||
|
40 -> {41} [color=red];
|
||||||
|
41 -> {42};
|
||||||
|
42 -> {43};
|
||||||
|
43 -> {44};
|
||||||
|
45 -> {50 46};
|
||||||
|
46 -> {47};
|
||||||
|
47 -> {48};
|
||||||
|
48 -> {49};
|
||||||
|
49 -> {50};
|
||||||
|
50 -> {41} [color=green];
|
||||||
|
50 -> {45} [color=green style=dashed];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+3
-3
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
val list: MutableList<(String) -> String> = null!!
|
val list: MutableList<(String) -> String> = null!!
|
||||||
<!AMBIGUITY!>list += { <!UNRESOLVED_REFERENCE!>it<!> }<!>
|
list += { it }
|
||||||
}
|
}
|
||||||
|
|
||||||
class A<T>(private val executor: ((T) -> Unit) -> Unit)
|
class A<T>(private val executor: ((T) -> Unit) -> Unit)
|
||||||
@@ -12,8 +12,8 @@ fun <T> postpone(computation: () -> T): A<T> {
|
|||||||
val queue = mutableListOf<() -> Unit>()
|
val queue = mutableListOf<() -> Unit>()
|
||||||
|
|
||||||
return A { resolve ->
|
return A { resolve ->
|
||||||
<!AMBIGUITY!>queue += {
|
queue += {
|
||||||
resolve(computation())
|
resolve(computation())
|
||||||
}<!>
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+19
-8
@@ -1,16 +1,27 @@
|
|||||||
FILE: plusAssignWithLambdaInRhs.kt
|
FILE: plusAssignWithLambdaInRhs.kt
|
||||||
public final operator fun <T> R|kotlin/collections/MutableList<T>|.plusAssign(x: R|T|): R|kotlin/Unit| {
|
|
||||||
}
|
|
||||||
public final operator fun <T> R|kotlin/collections/List<T>|.plus(x: R|T|): R|kotlin/collections/List<T>| {
|
|
||||||
^plus this@R|/plus|
|
|
||||||
}
|
|
||||||
public final fun test(): R|kotlin/Unit| {
|
public final fun test(): R|kotlin/Unit| {
|
||||||
lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>| = Null(null)!!
|
lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>| = Null(null)!!
|
||||||
R|<local>/list|.R|/plusAssign|<R|(kotlin/String) -> kotlin/String|>(fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| {
|
R|<local>/list|.R|kotlin/collections/plusAssign|<R|(kotlin/String) -> kotlin/String|>(fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <kind=UNKNOWN> {
|
||||||
^ R|<local>/it|
|
^ R|<local>/it|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
public final fun <T> listOf(x: R|T|): R|kotlin/collections/List<T>| {
|
public final class A<T> : R|kotlin/Any| {
|
||||||
^listOf Null(null)!!
|
public constructor<T>(executor: R|(kotlin/Function1<T, kotlin/Unit>) -> kotlin/Unit|): R|A<T>| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
private final val executor: R|(kotlin/Function1<T, kotlin/Unit>) -> kotlin/Unit| = R|<local>/executor|
|
||||||
|
private get(): R|(kotlin/Function1<T, kotlin/Unit>) -> kotlin/Unit|
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun <T> postpone(computation: R|() -> T|): R|A<T>| {
|
||||||
|
lval queue: R|kotlin/collections/MutableList<kotlin/Function0<kotlin/Unit>>| = R|kotlin/collections/mutableListOf|<R|() -> kotlin/Unit|>()
|
||||||
|
^postpone R|/A.A|<R|T|>(<L> = A@fun <anonymous>(resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||||
|
R|<local>/queue|.R|kotlin/collections/plusAssign|<R|() -> kotlin/Unit|>(A@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
|
||||||
|
R|<local>/resolve|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/computation|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|())
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ class FirSamResolverImpl(
|
|||||||
|
|
||||||
private fun resolveFunctionTypeIfSamInterface(firRegularClass: FirRegularClass): ConeKotlinType? {
|
private fun resolveFunctionTypeIfSamInterface(firRegularClass: FirRegularClass): ConeKotlinType? {
|
||||||
return resolvedFunctionType.getOrPut(firRegularClass) {
|
return resolvedFunctionType.getOrPut(firRegularClass) {
|
||||||
|
if (!firRegularClass.status.isFun) return@getOrPut NULL_STUB
|
||||||
val abstractMethod = firRegularClass.getSingleAbstractMethodOrNull(firSession, scopeSession) ?: return@getOrPut NULL_STUB
|
val abstractMethod = firRegularClass.getSingleAbstractMethodOrNull(firSession, scopeSession) ?: return@getOrPut NULL_STUB
|
||||||
// TODO: val shouldConvertFirstParameterToDescriptor = samWithReceiverResolvers.any { it.shouldConvertFirstSamParameterToReceiver(abstractMethod) }
|
// TODO: val shouldConvertFirstParameterToDescriptor = samWithReceiverResolvers.any { it.shouldConvertFirstSamParameterToReceiver(abstractMethod) }
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// KJS_WITH_FULL_RUNTIME
|
// KJS_WITH_FULL_RUNTIME
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// WITH_COROUTINES
|
// WITH_COROUTINES
|
||||||
|
|||||||
+1
-1
@@ -14,6 +14,6 @@ fun takeWithFun(a: WithFun) {}
|
|||||||
|
|
||||||
fun test() {
|
fun test() {
|
||||||
takeBase {}
|
takeBase {}
|
||||||
takeWithoutFun({})
|
<!INAPPLICABLE_CANDIDATE!>takeWithoutFun<!>({})
|
||||||
takeWithFun {}
|
takeWithFun {}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ fun foo(javaClass: JavaClass, kotlinClass: KotlinClass) {
|
|||||||
bar()
|
bar()
|
||||||
}
|
}
|
||||||
|
|
||||||
javaClass.doSomething2 {
|
javaClass.<!INAPPLICABLE_CANDIDATE!>doSomething2<!> {
|
||||||
bar()
|
bar()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,29 +92,29 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
TYPE_OP type=<root>.ChannelCoroutine<kotlin.Any> origin=CAST typeOperand=<root>.ChannelCoroutine<kotlin.Any>
|
TYPE_OP type=<root>.ChannelCoroutine<kotlin.Any> origin=CAST typeOperand=<root>.ChannelCoroutine<kotlin.Any>
|
||||||
CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<IrErrorType> origin=GET_PROPERTY
|
CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<IrErrorType> origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asFairChannel.<anonymous>' type=<root>.ProducerScope<IrErrorType> origin=null
|
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asFairChannel.<anonymous>' type=<root>.ProducerScope<IrErrorType> origin=null
|
||||||
CALL 'public abstract fun collect (collector: <root>.FlowCollector<T of <root>.Flow>): kotlin.Unit [suspend] declared in <root>.Flow' type=kotlin.Unit origin=null
|
CALL 'public final fun collect <T> (action: kotlin.coroutines.SuspendFunction1<T of <root>.collect, kotlin.Unit>): kotlin.Unit [inline,suspend] declared in <root>' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asFairChannel' type=<root>.Flow<*> origin=null
|
<T>: kotlin.Any?
|
||||||
collector: TYPE_OP type=<root>.FlowCollector<kotlin.Any?> origin=SAM_CONVERSION typeOperand=<root>.FlowCollector<kotlin.Any?>
|
$receiver: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asFairChannel' type=<root>.Flow<*> origin=null
|
||||||
FUN_EXPR type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
action: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
||||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (value:kotlin.Any?) returnType:kotlin.Unit
|
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (value:kotlin.Any?) returnType:kotlin.Unit [suspend]
|
||||||
VALUE_PARAMETER name:value index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:value index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit declared in <root>.asFairChannel.<anonymous>'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit [suspend] declared in <root>.asFairChannel.<anonymous>'
|
||||||
CALL 'public final fun sendFair (element: E of <root>.ChannelCoroutine): kotlin.Unit [suspend] declared in <root>.ChannelCoroutine' type=kotlin.Unit origin=null
|
CALL 'public final fun sendFair (element: E of <root>.ChannelCoroutine): kotlin.Unit [suspend] declared in <root>.ChannelCoroutine' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'val channel: <root>.ChannelCoroutine<kotlin.Any> [val] declared in <root>.asFairChannel.<anonymous>' type=<root>.ChannelCoroutine<kotlin.Any> origin=null
|
$this: GET_VAR 'val channel: <root>.ChannelCoroutine<kotlin.Any> [val] declared in <root>.asFairChannel.<anonymous>' type=<root>.ChannelCoroutine<kotlin.Any> origin=null
|
||||||
element: BLOCK type=kotlin.Any origin=ELVIS
|
element: BLOCK type=kotlin.Any origin=ELVIS
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val]
|
||||||
GET_VAR 'value: kotlin.Any? declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
GET_VAR 'value: kotlin.Any? declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
WHEN type=kotlin.Any origin=ELVIS
|
WHEN type=kotlin.Any origin=ELVIS
|
||||||
BRANCH
|
BRANCH
|
||||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||||
arg0: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
arg0: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||||
then: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' type=kotlin.Any origin=null
|
then: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' type=kotlin.Any origin=null
|
||||||
BRANCH
|
BRANCH
|
||||||
if: CONST Boolean type=kotlin.Boolean value=true
|
if: CONST Boolean type=kotlin.Boolean value=true
|
||||||
then: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
|
then: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
|
||||||
GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
GET_VAR 'val tmp_0: kotlin.Any? [val] declared in <root>.asFairChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
FUN name:asChannel visibility:private modality:FINAL <> ($receiver:<root>.CoroutineScope, flow:<root>.Flow<*>) returnType:<root>.ReceiveChannel<kotlin.Any>
|
FUN name:asChannel visibility:private modality:FINAL <> ($receiver:<root>.CoroutineScope, flow:<root>.Flow<*>) returnType:<root>.ReceiveChannel<kotlin.Any>
|
||||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.CoroutineScope
|
$receiver: VALUE_PARAMETER name:<this> type:<root>.CoroutineScope
|
||||||
VALUE_PARAMETER name:flow index:0 type:<root>.Flow<*>
|
VALUE_PARAMETER name:flow index:0 type:<root>.Flow<*>
|
||||||
@@ -127,30 +127,30 @@ FILE fqName:<root> fileName:/castsInsideCoroutineInference.kt
|
|||||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.ProducerScope<kotlin.Any>) returnType:kotlin.Unit [suspend]
|
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:<root>.ProducerScope<kotlin.Any>) returnType:kotlin.Unit [suspend]
|
||||||
$receiver: VALUE_PARAMETER name:<this> type:<root>.ProducerScope<kotlin.Any>
|
$receiver: VALUE_PARAMETER name:<this> type:<root>.ProducerScope<kotlin.Any>
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public abstract fun collect (collector: <root>.FlowCollector<T of <root>.Flow>): kotlin.Unit [suspend] declared in <root>.Flow' type=kotlin.Unit origin=null
|
CALL 'public final fun collect <T> (action: kotlin.coroutines.SuspendFunction1<T of <root>.collect, kotlin.Unit>): kotlin.Unit [inline,suspend] declared in <root>' type=kotlin.Unit origin=null
|
||||||
$this: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asChannel' type=<root>.Flow<*> origin=null
|
<T>: kotlin.Any?
|
||||||
collector: TYPE_OP type=<root>.FlowCollector<kotlin.Any?> origin=SAM_CONVERSION typeOperand=<root>.FlowCollector<kotlin.Any?>
|
$receiver: GET_VAR 'flow: <root>.Flow<*> declared in <root>.asChannel' type=<root>.Flow<*> origin=null
|
||||||
FUN_EXPR type=kotlin.Function1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
action: FUN_EXPR type=kotlin.coroutines.SuspendFunction1<kotlin.Any?, kotlin.Unit> origin=LAMBDA
|
||||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (value:kotlin.Any?) returnType:kotlin.Unit
|
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (value:kotlin.Any?) returnType:kotlin.Unit [suspend]
|
||||||
VALUE_PARAMETER name:value index:0 type:kotlin.Any?
|
VALUE_PARAMETER name:value index:0 type:kotlin.Any?
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit declared in <root>.asChannel.<anonymous>'
|
RETURN type=kotlin.Nothing from='local final fun <anonymous> (value: kotlin.Any?): kotlin.Unit [suspend] declared in <root>.asChannel.<anonymous>'
|
||||||
CALL 'public abstract fun send (e: E of <root>.SendChannel): kotlin.Unit [suspend] declared in <root>.SendChannel' type=kotlin.Unit origin=null
|
CALL 'public abstract fun send (e: E of <root>.SendChannel): kotlin.Unit [suspend] declared in <root>.SendChannel' type=kotlin.Unit origin=null
|
||||||
$this: CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<IrErrorType> origin=GET_PROPERTY
|
$this: CALL 'public abstract fun <get-channel> (): <root>.SendChannel<E of <root>.ProducerScope> declared in <root>.ProducerScope' type=<root>.SendChannel<IrErrorType> origin=GET_PROPERTY
|
||||||
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asChannel.<anonymous>' type=<root>.ProducerScope<IrErrorType> origin=null
|
$this: GET_VAR '<this>: <root>.ProducerScope<kotlin.Any> declared in <root>.asChannel.<anonymous>' type=<root>.ProducerScope<IrErrorType> origin=null
|
||||||
e: BLOCK type=kotlin.Any origin=ELVIS
|
e: BLOCK type=kotlin.Any origin=ELVIS
|
||||||
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val]
|
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Any? [val]
|
||||||
GET_VAR 'value: kotlin.Any? declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
GET_VAR 'value: kotlin.Any? declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
WHEN type=kotlin.Any origin=ELVIS
|
WHEN type=kotlin.Any origin=ELVIS
|
||||||
BRANCH
|
BRANCH
|
||||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||||
arg0: GET_VAR 'val tmp_1: kotlin.Any? [val] declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
arg0: GET_VAR 'val tmp_1: kotlin.Any? [val] declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||||
then: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' type=kotlin.Any origin=null
|
then: CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any' type=kotlin.Any origin=null
|
||||||
BRANCH
|
BRANCH
|
||||||
if: CONST Boolean type=kotlin.Boolean value=true
|
if: CONST Boolean type=kotlin.Boolean value=true
|
||||||
then: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
|
then: TYPE_OP type=kotlin.Any origin=IMPLICIT_CAST typeOperand=kotlin.Any
|
||||||
GET_VAR 'val tmp_1: kotlin.Any? [val] declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
GET_VAR 'val tmp_1: kotlin.Any? [val] declared in <root>.asChannel.<anonymous>.<anonymous>' type=kotlin.Any? origin=null
|
||||||
CLASS CLASS name:SafeCollector modality:FINAL visibility:public superTypes:[<root>.FlowCollector<T of <root>.SafeCollector>]
|
CLASS CLASS name:SafeCollector modality:FINAL visibility:public superTypes:[<root>.FlowCollector<T of <root>.SafeCollector>]
|
||||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SafeCollector<T of <root>.SafeCollector>
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.SafeCollector<T of <root>.SafeCollector>
|
||||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||||
|
|||||||
Reference in New Issue
Block a user