[FIR] Fix determining coercion to Unit
This commit is contained in:
+5
-6
@@ -138,8 +138,10 @@ class PostponedArgumentsAnalyzer(
|
|||||||
|
|
||||||
val checkerSink: CheckerSink = CheckerSinkImpl(components)
|
val checkerSink: CheckerSink = CheckerSinkImpl(components)
|
||||||
|
|
||||||
val subResolvedKtPrimitives = returnArguments.map {
|
var hasExpressionInReturnArguments = false
|
||||||
if (it !is FirExpression) return@map
|
returnArguments.forEach {
|
||||||
|
if (it !is FirExpression) return@forEach
|
||||||
|
hasExpressionInReturnArguments = true
|
||||||
candidate.resolveArgumentExpression(
|
candidate.resolveArgumentExpression(
|
||||||
c.getBuilder(),
|
c.getBuilder(),
|
||||||
it,
|
it,
|
||||||
@@ -150,12 +152,9 @@ class PostponedArgumentsAnalyzer(
|
|||||||
isDispatch = false,
|
isDispatch = false,
|
||||||
isSafeCall = false
|
isSafeCall = false
|
||||||
)
|
)
|
||||||
// resolveKtPrimitive(
|
|
||||||
// c.getBuilder(), it, lambda.returnType.let(::substitute), diagnosticHolder, isReceiver = false
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (returnArguments.isEmpty()) {
|
if (!hasExpressionInReturnArguments) {
|
||||||
val lambdaReturnType = lambda.returnType.let(::substitute)
|
val lambdaReturnType = lambda.returnType.let(::substitute)
|
||||||
c.getBuilder().addSubtypeConstraint(
|
c.getBuilder().addSubtypeConstraint(
|
||||||
lambdaReturnType,
|
lambdaReturnType,
|
||||||
|
|||||||
+146
-149
@@ -16,11 +16,10 @@ digraph callsInPlace_kt {
|
|||||||
6 [label="Exit function anonymousFunction"];
|
6 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
7 [label="Postponed exit from lambda"];
|
7 [label="Postponed exit from lambda"];
|
||||||
8 [label="Function call: R|kotlin/run|<R|kotlin/Nothing|>(<L> = run@fun <anonymous>(): R|kotlin/Nothing| <kind=EXACTLY_ONCE> )"];
|
8 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> )"];
|
||||||
9 [label="Stub" style="filled" fillcolor=gray];
|
9 [label="Access variable R|<local>/x|"];
|
||||||
10 [label="Access variable R|<local>/x|" style="filled" fillcolor=gray];
|
10 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
|
||||||
11 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=gray];
|
11 [label="Exit function test" style="filled" fillcolor=red];
|
||||||
12 [label="Exit function test" style="filled" fillcolor=red];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
0 -> {1};
|
0 -> {1};
|
||||||
@@ -32,258 +31,256 @@ digraph callsInPlace_kt {
|
|||||||
5 -> {6};
|
5 -> {6};
|
||||||
6 -> {7} [color=green];
|
6 -> {7} [color=green];
|
||||||
7 -> {8};
|
7 -> {8};
|
||||||
8 -> {12};
|
8 -> {9};
|
||||||
8 -> {9} [style=dotted];
|
9 -> {10};
|
||||||
9 -> {10} [style=dotted];
|
10 -> {11};
|
||||||
10 -> {11} [style=dotted];
|
|
||||||
11 -> {12} [style=dotted];
|
|
||||||
|
|
||||||
subgraph cluster_2 {
|
subgraph cluster_2 {
|
||||||
color=red
|
color=red
|
||||||
13 [label="Enter function test_2" style="filled" fillcolor=red];
|
12 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||||
14 [label="Const: Int(10)"];
|
13 [label="Const: Int(10)"];
|
||||||
15 [label="Postponed enter to lambda"];
|
14 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_3 {
|
subgraph cluster_3 {
|
||||||
color=blue
|
color=blue
|
||||||
16 [label="Enter function anonymousFunction"];
|
15 [label="Enter function anonymousFunction"];
|
||||||
17 [label="Const: String(test_2)"];
|
16 [label="Const: String(test_2)"];
|
||||||
18 [label="Exit function anonymousFunction"];
|
17 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
19 [label="Postponed exit from lambda"];
|
18 [label="Postponed exit from lambda"];
|
||||||
20 [label="Function call: R|kotlin/repeat|(Int(10), <L> = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
19 [label="Function call: R|kotlin/repeat|(Int(10), <L> = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
||||||
21 [label="Exit function test_2" style="filled" fillcolor=red];
|
20 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12 -> {13};
|
||||||
13 -> {14};
|
13 -> {14};
|
||||||
14 -> {15};
|
14 -> {15};
|
||||||
15 -> {16};
|
14 -> {18} [color=red];
|
||||||
15 -> {19} [color=red];
|
15 -> {17 16};
|
||||||
16 -> {18 17};
|
16 -> {17};
|
||||||
17 -> {18};
|
17 -> {15};
|
||||||
18 -> {16};
|
17 -> {18} [color=green];
|
||||||
18 -> {19} [color=green];
|
18 -> {19};
|
||||||
19 -> {20};
|
19 -> {20};
|
||||||
20 -> {21};
|
|
||||||
|
|
||||||
subgraph cluster_4 {
|
subgraph cluster_4 {
|
||||||
color=red
|
color=red
|
||||||
22 [label="Enter function test_3" style="filled" fillcolor=red];
|
21 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||||
23 [label="Postponed enter to lambda"];
|
22 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_5 {
|
subgraph cluster_5 {
|
||||||
color=blue
|
color=blue
|
||||||
24 [label="Enter function anonymousFunction"];
|
23 [label="Enter function anonymousFunction"];
|
||||||
25 [label="Const: String(test_3)"];
|
24 [label="Const: String(test_3)"];
|
||||||
26 [label="Exit function anonymousFunction"];
|
25 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
27 [label="Postponed exit from lambda"];
|
26 [label="Postponed exit from lambda"];
|
||||||
28 [label="Const: Int(10)"];
|
27 [label="Const: Int(10)"];
|
||||||
29 [label="Function call: R|kotlin/repeat|(action = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> , times = Int(10))"];
|
28 [label="Function call: R|kotlin/repeat|(action = repeat@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Unit| <kind=UNKNOWN> , times = Int(10))"];
|
||||||
30 [label="Exit function test_3" style="filled" fillcolor=red];
|
29 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
21 -> {22};
|
||||||
22 -> {23};
|
22 -> {23};
|
||||||
23 -> {24};
|
22 -> {26} [color=red];
|
||||||
23 -> {27} [color=red];
|
23 -> {25 24};
|
||||||
24 -> {26 25};
|
24 -> {25};
|
||||||
25 -> {26};
|
25 -> {23};
|
||||||
26 -> {24};
|
25 -> {26} [color=green];
|
||||||
26 -> {27} [color=green];
|
26 -> {27};
|
||||||
27 -> {28};
|
27 -> {28};
|
||||||
28 -> {29};
|
28 -> {29};
|
||||||
29 -> {30};
|
|
||||||
|
|
||||||
subgraph cluster_6 {
|
subgraph cluster_6 {
|
||||||
color=red
|
color=red
|
||||||
31 [label="Enter function test_4" style="filled" fillcolor=red];
|
30 [label="Enter function test_4" style="filled" fillcolor=red];
|
||||||
32 [label="Const: Int(1)"];
|
31 [label="Const: Int(1)"];
|
||||||
33 [label="Postponed enter to lambda"];
|
32 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_7 {
|
subgraph cluster_7 {
|
||||||
color=blue
|
color=blue
|
||||||
34 [label="Enter function anonymousFunction"];
|
33 [label="Enter function anonymousFunction"];
|
||||||
35 [label="Const: String(test_4)"];
|
34 [label="Const: String(test_4)"];
|
||||||
36 [label="Access variable R|<local>/it|"];
|
35 [label="Access variable R|<local>/it|"];
|
||||||
37 [label="Const: Int(0)"];
|
36 [label="Const: Int(0)"];
|
||||||
38 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"];
|
37 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"];
|
||||||
39 [label="Comparison >"];
|
38 [label="Comparison >"];
|
||||||
40 [label="Exit function anonymousFunction"];
|
39 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
41 [label="Postponed exit from lambda"];
|
40 [label="Postponed exit from lambda"];
|
||||||
42 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(<L> = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"];
|
41 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(<L> = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"];
|
||||||
43 [label="Exit function test_4" style="filled" fillcolor=red];
|
42 [label="Exit function test_4" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
30 -> {31};
|
||||||
31 -> {32};
|
31 -> {32};
|
||||||
32 -> {33};
|
32 -> {33};
|
||||||
|
32 -> {40} [color=red];
|
||||||
33 -> {34};
|
33 -> {34};
|
||||||
33 -> {41} [color=red];
|
|
||||||
34 -> {35};
|
34 -> {35};
|
||||||
35 -> {36};
|
35 -> {36};
|
||||||
36 -> {37};
|
36 -> {37};
|
||||||
37 -> {38};
|
37 -> {38};
|
||||||
38 -> {39};
|
38 -> {39};
|
||||||
39 -> {40};
|
39 -> {40} [color=green];
|
||||||
40 -> {41} [color=green];
|
40 -> {41};
|
||||||
41 -> {42};
|
41 -> {42};
|
||||||
42 -> {43};
|
|
||||||
|
|
||||||
subgraph cluster_8 {
|
subgraph cluster_8 {
|
||||||
color=red
|
color=red
|
||||||
44 [label="Enter function test_5" style="filled" fillcolor=red];
|
43 [label="Enter function test_5" style="filled" fillcolor=red];
|
||||||
45 [label="Const: Int(1)"];
|
44 [label="Const: Int(1)"];
|
||||||
46 [label="Postponed enter to lambda"];
|
45 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_9 {
|
subgraph cluster_9 {
|
||||||
color=blue
|
color=blue
|
||||||
47 [label="Enter function anonymousFunction"];
|
46 [label="Enter function anonymousFunction"];
|
||||||
48 [label="Const: String(test_5)"];
|
47 [label="Const: String(test_5)"];
|
||||||
49 [label="Access variable R|<local>/it|"];
|
48 [label="Access variable R|<local>/it|"];
|
||||||
50 [label="Const: Int(0)"];
|
49 [label="Const: Int(0)"];
|
||||||
51 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"];
|
50 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(Int(0))"];
|
||||||
52 [label="Comparison >"];
|
51 [label="Comparison >"];
|
||||||
53 [label="Exit function anonymousFunction"];
|
52 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
54 [label="Postponed exit from lambda"];
|
53 [label="Postponed exit from lambda"];
|
||||||
55 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(predicate = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"];
|
54 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(predicate = takeUnless@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/Boolean| <kind=EXACTLY_ONCE> )"];
|
||||||
56 [label="Exit function test_5" style="filled" fillcolor=red];
|
55 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
43 -> {44};
|
||||||
44 -> {45};
|
44 -> {45};
|
||||||
45 -> {46};
|
45 -> {46};
|
||||||
|
45 -> {53} [color=red];
|
||||||
46 -> {47};
|
46 -> {47};
|
||||||
46 -> {54} [color=red];
|
|
||||||
47 -> {48};
|
47 -> {48};
|
||||||
48 -> {49};
|
48 -> {49};
|
||||||
49 -> {50};
|
49 -> {50};
|
||||||
50 -> {51};
|
50 -> {51};
|
||||||
51 -> {52};
|
51 -> {52};
|
||||||
52 -> {53};
|
52 -> {53} [color=green];
|
||||||
53 -> {54} [color=green];
|
53 -> {54};
|
||||||
54 -> {55};
|
54 -> {55};
|
||||||
55 -> {56};
|
|
||||||
|
|
||||||
subgraph cluster_10 {
|
subgraph cluster_10 {
|
||||||
color=red
|
color=red
|
||||||
57 [label="Enter function myRun" style="filled" fillcolor=red];
|
56 [label="Enter function myRun" style="filled" fillcolor=red];
|
||||||
58 [label="Function call: R|<local>/block1|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
57 [label="Function call: R|<local>/block1|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||||
59 [label="Function call: R|<local>/block2|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
58 [label="Function call: R|<local>/block2|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||||
60 [label="Exit function myRun" style="filled" fillcolor=red];
|
59 [label="Exit function myRun" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
56 -> {57};
|
||||||
57 -> {58};
|
57 -> {58};
|
||||||
58 -> {59};
|
58 -> {59};
|
||||||
59 -> {60};
|
|
||||||
|
|
||||||
subgraph cluster_11 {
|
subgraph cluster_11 {
|
||||||
color=red
|
color=red
|
||||||
61 [label="Enter function test_6" style="filled" fillcolor=red];
|
60 [label="Enter function test_6" style="filled" fillcolor=red];
|
||||||
62 [label="Postponed enter to lambda"];
|
61 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_12 {
|
subgraph cluster_12 {
|
||||||
color=blue
|
color=blue
|
||||||
63 [label="Enter function anonymousFunction"];
|
62 [label="Enter function anonymousFunction"];
|
||||||
64 [label="Const: String(test_6_1)"];
|
63 [label="Const: String(test_6_1)"];
|
||||||
65 [label="Exit function anonymousFunction"];
|
64 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
66 [label="Postponed exit from lambda"];
|
65 [label="Postponed exit from lambda"];
|
||||||
67 [label="Postponed enter to lambda"];
|
66 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_13 {
|
subgraph cluster_13 {
|
||||||
color=blue
|
color=blue
|
||||||
68 [label="Enter function anonymousFunction"];
|
67 [label="Enter function anonymousFunction"];
|
||||||
69 [label="Const: String(test_6_2)"];
|
68 [label="Const: String(test_6_2)"];
|
||||||
70 [label="Exit function anonymousFunction"];
|
69 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
71 [label="Postponed exit from lambda"];
|
70 [label="Postponed exit from lambda"];
|
||||||
72 [label="Function call: R|/myRun|(myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , <L> = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
71 [label="Function call: R|/myRun|(myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , <L> = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
||||||
73 [label="Exit function test_6" style="filled" fillcolor=red];
|
72 [label="Exit function test_6" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
60 -> {61};
|
||||||
61 -> {62};
|
61 -> {62};
|
||||||
62 -> {63};
|
61 -> {65} [color=red];
|
||||||
62 -> {66} [color=red];
|
62 -> {64 63};
|
||||||
63 -> {65 64};
|
63 -> {64};
|
||||||
64 -> {65};
|
64 -> {62};
|
||||||
65 -> {63};
|
64 -> {65} [color=green];
|
||||||
65 -> {66} [color=green];
|
65 -> {66};
|
||||||
66 -> {67};
|
66 -> {67};
|
||||||
67 -> {68};
|
66 -> {70} [color=red];
|
||||||
67 -> {71} [color=red];
|
67 -> {69 68};
|
||||||
68 -> {70 69};
|
68 -> {69};
|
||||||
69 -> {70};
|
69 -> {67};
|
||||||
70 -> {68};
|
69 -> {70} [color=green];
|
||||||
70 -> {71} [color=green];
|
70 -> {71};
|
||||||
71 -> {72};
|
71 -> {72};
|
||||||
72 -> {73};
|
|
||||||
|
|
||||||
subgraph cluster_14 {
|
subgraph cluster_14 {
|
||||||
color=red
|
color=red
|
||||||
74 [label="Enter function test_7" style="filled" fillcolor=red];
|
73 [label="Enter function test_7" style="filled" fillcolor=red];
|
||||||
75 [label="Postponed enter to lambda"];
|
74 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_15 {
|
subgraph cluster_15 {
|
||||||
color=blue
|
color=blue
|
||||||
76 [label="Enter function anonymousFunction"];
|
75 [label="Enter function anonymousFunction"];
|
||||||
77 [label="Const: String(test_7_2)"];
|
76 [label="Const: String(test_7_2)"];
|
||||||
78 [label="Exit function anonymousFunction"];
|
77 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
79 [label="Postponed exit from lambda"];
|
78 [label="Postponed exit from lambda"];
|
||||||
80 [label="Postponed enter to lambda"];
|
79 [label="Postponed enter to lambda"];
|
||||||
subgraph cluster_16 {
|
subgraph cluster_16 {
|
||||||
color=blue
|
color=blue
|
||||||
81 [label="Enter function anonymousFunction"];
|
80 [label="Enter function anonymousFunction"];
|
||||||
82 [label="Const: String(test_7_1)"];
|
81 [label="Const: String(test_7_1)"];
|
||||||
83 [label="Exit function anonymousFunction"];
|
82 [label="Exit function anonymousFunction"];
|
||||||
}
|
}
|
||||||
84 [label="Postponed exit from lambda"];
|
83 [label="Postponed exit from lambda"];
|
||||||
85 [label="Function call: R|/myRun|(block2 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , block1 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
84 [label="Function call: R|/myRun|(block2 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> , block1 = myRun@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> )"];
|
||||||
86 [label="Exit function test_7" style="filled" fillcolor=red];
|
85 [label="Exit function test_7" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
73 -> {74};
|
||||||
74 -> {75};
|
74 -> {75};
|
||||||
75 -> {76};
|
74 -> {78} [color=red];
|
||||||
75 -> {79} [color=red];
|
75 -> {77 76};
|
||||||
76 -> {78 77};
|
76 -> {77};
|
||||||
77 -> {78};
|
77 -> {75};
|
||||||
78 -> {76};
|
77 -> {78} [color=green];
|
||||||
78 -> {79} [color=green];
|
78 -> {79};
|
||||||
79 -> {80};
|
79 -> {80};
|
||||||
80 -> {81};
|
79 -> {83} [color=red];
|
||||||
80 -> {84} [color=red];
|
80 -> {82 81};
|
||||||
81 -> {83 82};
|
81 -> {82};
|
||||||
82 -> {83};
|
82 -> {80};
|
||||||
83 -> {81};
|
82 -> {83} [color=green];
|
||||||
83 -> {84} [color=green];
|
83 -> {84};
|
||||||
84 -> {85};
|
84 -> {85};
|
||||||
85 -> {86};
|
|
||||||
|
|
||||||
subgraph cluster_17 {
|
subgraph cluster_17 {
|
||||||
color=red
|
color=red
|
||||||
87 [label="Enter function myDummyRun" style="filled" fillcolor=red];
|
86 [label="Enter function myDummyRun" style="filled" fillcolor=red];
|
||||||
88 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
87 [label="Function call: R|<local>/block|.R|FakeOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||||
89 [label="Exit function myDummyRun" style="filled" fillcolor=red];
|
88 [label="Exit function myDummyRun" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
86 -> {87};
|
||||||
87 -> {88};
|
87 -> {88};
|
||||||
88 -> {89};
|
|
||||||
|
|
||||||
subgraph cluster_18 {
|
subgraph cluster_18 {
|
||||||
color=red
|
color=red
|
||||||
90 [label="Enter function test_8" style="filled" fillcolor=red];
|
89 [label="Enter function test_8" style="filled" fillcolor=red];
|
||||||
91 [label="Postponed enter to lambda"];
|
90 [label="Postponed enter to lambda"];
|
||||||
92 [label="Postponed exit from lambda"];
|
91 [label="Postponed exit from lambda"];
|
||||||
93 [label="Function call: R|/myDummyRun|(<L> = myDummyRun@fun <anonymous>(): R|kotlin/Unit|)"];
|
92 [label="Function call: R|/myDummyRun|(<L> = myDummyRun@fun <anonymous>(): R|kotlin/Unit|)"];
|
||||||
94 [label="Exit function test_8" style="filled" fillcolor=red];
|
93 [label="Exit function test_8" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
90 -> {91};
|
89 -> {90};
|
||||||
91 -> {92 92} [color=green];
|
90 -> {91 91} [color=green];
|
||||||
|
91 -> {92};
|
||||||
92 -> {93};
|
92 -> {93};
|
||||||
93 -> {94};
|
|
||||||
|
|
||||||
subgraph cluster_19 {
|
subgraph cluster_19 {
|
||||||
color=red
|
color=red
|
||||||
95 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
94 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||||
96 [label="Const: String(test_8)"];
|
95 [label="Const: String(test_8)"];
|
||||||
97 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
96 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
94 -> {95};
|
||||||
95 -> {96};
|
95 -> {96};
|
||||||
96 -> {97};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
FILE: callsInPlace.kt
|
FILE: callsInPlace.kt
|
||||||
public final fun test(): R|kotlin/Unit| {
|
public final fun test(): R|kotlin/Unit| {
|
||||||
lval x: R|kotlin/Int|
|
lval x: R|kotlin/Int|
|
||||||
R|kotlin/run|<R|kotlin/Nothing|>(<L> = run@fun <anonymous>(): R|kotlin/Nothing| <kind=EXACTLY_ONCE> {
|
R|kotlin/run|<R|kotlin/Unit|>(<L> = run@fun <anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||||
R|<local>/x| = Int(1)
|
R|<local>/x| = Int(1)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ FILE: runOnIntegerLiteral.kt
|
|||||||
public get(): R|kotlin/Int|
|
public get(): R|kotlin/Int|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
Int(1).R|kotlin/run|<R|kotlin/Int|, R|kotlin/Nothing|>(<L> = run@fun R|kotlin/Int|.<anonymous>(): R|kotlin/Nothing| <kind=EXACTLY_ONCE> {
|
Int(1).R|kotlin/run|<R|kotlin/Int|, R|kotlin/Unit|>(<L> = run@fun R|kotlin/Int|.<anonymous>(): R|kotlin/Unit| <kind=EXACTLY_ONCE> {
|
||||||
this@R|/TestInitValInLambdaCalledOnce|.R|/TestInitValInLambdaCalledOnce.x| = Int(0)
|
this@R|/TestInitValInLambdaCalledOnce|.R|/TestInitValInLambdaCalledOnce.x| = Int(0)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Vendored
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
lateinit var ok: String
|
lateinit var ok: String
|
||||||
run {
|
run {
|
||||||
|
|||||||
-1
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
lateinit var ok: String
|
lateinit var ok: String
|
||||||
|
|
||||||
fun box(): String {
|
fun box(): String {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_BACKEND_FIR: JVM_IR
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
|
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ FILE fqName:<root> fileName:/initValInLambda.kt
|
|||||||
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce.<get-x>' type=<root>.TestInitValInLambdaCalledOnce origin=null
|
receiver: GET_VAR '<this>: <root>.TestInitValInLambdaCalledOnce declared in <root>.TestInitValInLambdaCalledOnce.<get-x>' type=<root>.TestInitValInLambdaCalledOnce origin=null
|
||||||
ANONYMOUS_INITIALIZER isStatic=false
|
ANONYMOUS_INITIALIZER isStatic=false
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
CALL 'public final fun run <T, R> (block: kotlin.Function1<T of kotlin.run, R of kotlin.run>): R of kotlin.run [inline] declared in kotlin' type=kotlin.Nothing origin=null
|
CALL 'public final fun run <T, R> (block: kotlin.Function1<T of kotlin.run, R of kotlin.run>): R of kotlin.run [inline] declared in kotlin' type=kotlin.Unit origin=null
|
||||||
<T>: kotlin.Int
|
<T>: kotlin.Int
|
||||||
<R>: kotlin.Nothing
|
<R>: kotlin.Unit
|
||||||
$receiver: CONST Int type=kotlin.Int value=1
|
$receiver: CONST Int type=kotlin.Int value=1
|
||||||
block: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Nothing> origin=LAMBDA
|
block: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=LAMBDA
|
||||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Nothing
|
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit
|
||||||
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
|
$receiver: VALUE_PARAMETER name:<this> type:kotlin.Int
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
|
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
|
||||||
|
|||||||
Reference in New Issue
Block a user