FIR: Fix resolution for lambda returning resolved qualifier
This commit is contained in:
@@ -586,6 +586,10 @@ abstract class FirDataFlowAnalyzer<FLOW : Flow>(
|
|||||||
exitSafeCall(qualifiedAccessExpression)
|
exitSafeCall(qualifiedAccessExpression)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun exitResolvedQualifierNode(resolvedQualifier: FirResolvedQualifier) {
|
||||||
|
graphBuilder.exitResolvedQualifierNode(resolvedQualifier).mergeIncomingFlow()
|
||||||
|
}
|
||||||
|
|
||||||
fun enterCall(functionCall: FirCall) {
|
fun enterCall(functionCall: FirCall) {
|
||||||
graphBuilder.enterCall(functionCall)
|
graphBuilder.enterCall(functionCall)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,6 +202,12 @@ class QualifiedAccessNode(
|
|||||||
level: Int, id: Int
|
level: Int, id: Int
|
||||||
) : CFGNode<FirQualifiedAccessExpression>(owner, level, id)
|
) : CFGNode<FirQualifiedAccessExpression>(owner, level, id)
|
||||||
|
|
||||||
|
class ResolvedQualifierNode(
|
||||||
|
owner: ControlFlowGraph,
|
||||||
|
override val fir: FirResolvedQualifier,
|
||||||
|
level: Int, id: Int
|
||||||
|
) : CFGNode<FirResolvedQualifier>(owner, level, id)
|
||||||
|
|
||||||
class FunctionCallNode(
|
class FunctionCallNode(
|
||||||
owner: ControlFlowGraph,
|
owner: ControlFlowGraph,
|
||||||
override val fir: FirFunctionCall,
|
override val fir: FirFunctionCall,
|
||||||
|
|||||||
+4
@@ -621,6 +621,10 @@ class ControlFlowGraphBuilder {
|
|||||||
return node
|
return node
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun exitResolvedQualifierNode(resolvedQualifier: FirResolvedQualifier): ResolvedQualifierNode {
|
||||||
|
return createResolvedQualifierNode(resolvedQualifier).also(this::addNewSimpleNode)
|
||||||
|
}
|
||||||
|
|
||||||
fun enterCall(call: FirCall) {
|
fun enterCall(call: FirCall) {
|
||||||
levelCounter++
|
levelCounter++
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -39,6 +39,9 @@ fun ControlFlowGraphBuilder.createCheckNotNullCallNode(fir: FirCheckNotNullCall)
|
|||||||
fun ControlFlowGraphBuilder.createQualifiedAccessNode(fir: FirQualifiedAccessExpression): QualifiedAccessNode =
|
fun ControlFlowGraphBuilder.createQualifiedAccessNode(fir: FirQualifiedAccessExpression): QualifiedAccessNode =
|
||||||
QualifiedAccessNode(graph, fir, levelCounter, createId())
|
QualifiedAccessNode(graph, fir, levelCounter, createId())
|
||||||
|
|
||||||
|
fun ControlFlowGraphBuilder.createResolvedQualifierNode(fir: FirResolvedQualifier): ResolvedQualifierNode =
|
||||||
|
ResolvedQualifierNode(graph, fir, levelCounter, createId())
|
||||||
|
|
||||||
fun ControlFlowGraphBuilder.createBlockEnterNode(fir: FirBlock): BlockEnterNode = BlockEnterNode(graph, fir, levelCounter, createId())
|
fun ControlFlowGraphBuilder.createBlockEnterNode(fir: FirBlock): BlockEnterNode = BlockEnterNode(graph, fir, levelCounter, createId())
|
||||||
|
|
||||||
fun ControlFlowGraphBuilder.createBlockExitNode(fir: FirBlock): BlockExitNode = BlockExitNode(graph, fir, levelCounter, createId())
|
fun ControlFlowGraphBuilder.createBlockExitNode(fir: FirBlock): BlockExitNode = BlockExitNode(graph, fir, levelCounter, createId())
|
||||||
|
|||||||
+1
@@ -166,6 +166,7 @@ private fun CFGNode<*>.render(): String =
|
|||||||
is LoopExitNode -> "Exit ${fir.type()}loop"
|
is LoopExitNode -> "Exit ${fir.type()}loop"
|
||||||
|
|
||||||
is QualifiedAccessNode -> "Access variable ${fir.calleeReference.render(CfgRenderMode)}"
|
is QualifiedAccessNode -> "Access variable ${fir.calleeReference.render(CfgRenderMode)}"
|
||||||
|
is ResolvedQualifierNode -> "Access qualifier ${fir.classId}"
|
||||||
is OperatorCallNode -> "Operator ${fir.operation.operator}"
|
is OperatorCallNode -> "Operator ${fir.operation.operator}"
|
||||||
is ComparisonExpressionNode -> "Comparison ${fir.operation.operator}"
|
is ComparisonExpressionNode -> "Comparison ${fir.operation.operator}"
|
||||||
is TypeOperatorCallNode -> "Type operator: \"${fir.render(CfgRenderMode)}\""
|
is TypeOperatorCallNode -> "Type operator: \"${fir.render(CfgRenderMode)}\""
|
||||||
|
|||||||
+9
-4
@@ -137,10 +137,15 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (result is FirQualifiedAccessExpression) {
|
when (result) {
|
||||||
dataFlowAnalyzer.enterQualifiedAccessExpression(result)
|
is FirQualifiedAccessExpression -> {
|
||||||
result = components.transformQualifiedAccessUsingSmartcastInfo(result)
|
dataFlowAnalyzer.enterQualifiedAccessExpression(result)
|
||||||
dataFlowAnalyzer.exitQualifiedAccessExpression(result)
|
result = components.transformQualifiedAccessUsingSmartcastInfo(result)
|
||||||
|
dataFlowAnalyzer.exitQualifiedAccessExpression(result)
|
||||||
|
}
|
||||||
|
is FirResolvedQualifier -> {
|
||||||
|
dataFlowAnalyzer.exitResolvedQualifierNode(result)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result.compose()
|
return result.compose()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
digraph lambdaReturningObject_kt {
|
||||||
|
graph [nodesep=3]
|
||||||
|
node [shape=box penwidth=2]
|
||||||
|
edge [penwidth=2]
|
||||||
|
|
||||||
|
subgraph cluster_0 {
|
||||||
|
color=red
|
||||||
|
0 [label="Enter function bar" style="filled" fillcolor=red];
|
||||||
|
1 [label="Exit function bar" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
0 -> {1};
|
||||||
|
|
||||||
|
subgraph cluster_1 {
|
||||||
|
color=red
|
||||||
|
2 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||||
|
3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||||
|
4 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
2 -> {3};
|
||||||
|
3 -> {4};
|
||||||
|
|
||||||
|
subgraph cluster_2 {
|
||||||
|
color=red
|
||||||
|
5 [label="Enter function MyOut" style="filled" fillcolor=red];
|
||||||
|
6 [label="Function call: R|kotlin/TODO|()"];
|
||||||
|
7 [label="Stub" style="filled" fillcolor=gray];
|
||||||
|
8 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray];
|
||||||
|
9 [label="Stub" style="filled" fillcolor=gray];
|
||||||
|
10 [label="Exit function MyOut" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
5 -> {6};
|
||||||
|
6 -> {10};
|
||||||
|
6 -> {7} [style=dotted];
|
||||||
|
7 -> {8} [style=dotted];
|
||||||
|
8 -> {10 9} [style=dotted];
|
||||||
|
9 -> {10} [style=dotted];
|
||||||
|
|
||||||
|
subgraph cluster_3 {
|
||||||
|
color=red
|
||||||
|
11 [label="Enter function foo" style="filled" fillcolor=red];
|
||||||
|
12 [label="Postponed enter to lambda"];
|
||||||
|
13 [label="Postponed exit from lambda"];
|
||||||
|
14 [label="Function call: R|/MyOut|<R|IrStarProjectionImpl|>(...)"];
|
||||||
|
15 [label="Function call: R|/bar|(...)"];
|
||||||
|
16 [label="Exit function foo" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
11 -> {12};
|
||||||
|
12 -> {13 13} [color=green];
|
||||||
|
13 -> {14};
|
||||||
|
14 -> {15};
|
||||||
|
15 -> {16};
|
||||||
|
|
||||||
|
subgraph cluster_4 {
|
||||||
|
color=red
|
||||||
|
17 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
18 [label="Access qualifier /IrStarProjectionImpl"];
|
||||||
|
19 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
17 -> {18};
|
||||||
|
18 -> {19};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// !DUMP_CFG
|
||||||
|
|
||||||
|
interface Out<out E>
|
||||||
|
fun bar(arguments: Out<IrTypeArgument>) {}
|
||||||
|
|
||||||
|
interface IrTypeArgument
|
||||||
|
|
||||||
|
object IrStarProjectionImpl : IrTypeArgument
|
||||||
|
|
||||||
|
fun <T> MyOut(init: () -> T): Out<T> = TODO()
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
bar(MyOut { IrStarProjectionImpl })
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
FILE: lambdaReturningObject.kt
|
||||||
|
public abstract interface Out<out E> : R|kotlin/Any| {
|
||||||
|
}
|
||||||
|
public final fun bar(arguments: R|Out<IrTypeArgument>|): R|kotlin/Unit| {
|
||||||
|
}
|
||||||
|
public abstract interface IrTypeArgument : R|kotlin/Any| {
|
||||||
|
}
|
||||||
|
public final object IrStarProjectionImpl : R|IrTypeArgument| {
|
||||||
|
private constructor(): R|IrStarProjectionImpl| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun <T> MyOut(init: R|() -> T|): R|Out<T>| {
|
||||||
|
^MyOut R|kotlin/TODO|()
|
||||||
|
}
|
||||||
|
public final fun foo(): R|kotlin/Unit| {
|
||||||
|
R|/bar|(R|/MyOut|<R|IrStarProjectionImpl|>(<L> = MyOut@fun <anonymous>(): R|IrStarProjectionImpl| {
|
||||||
|
^ Q|IrStarProjectionImpl|
|
||||||
|
}
|
||||||
|
))
|
||||||
|
}
|
||||||
+139
-121
@@ -50,49 +50,52 @@ digraph exhaustiveWhenAndDNNType_kt {
|
|||||||
subgraph cluster_5 {
|
subgraph cluster_5 {
|
||||||
color=red
|
color=red
|
||||||
12 [label="Enter function test_1" style="filled" fillcolor=red];
|
12 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||||
13 [label="Access variable R|/SomeEnum.A1|"];
|
13 [label="Access qualifier /SomeEnum"];
|
||||||
14 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
14 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
|
15 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
||||||
subgraph cluster_6 {
|
subgraph cluster_6 {
|
||||||
color=blue
|
color=blue
|
||||||
15 [label="Enter when"];
|
16 [label="Enter when"];
|
||||||
16 [label="Access variable R|<local>/flag|"];
|
17 [label="Access variable R|<local>/flag|"];
|
||||||
17 [label="Check not null: R|<local>/flag|!!"];
|
18 [label="Check not null: R|<local>/flag|!!"];
|
||||||
subgraph cluster_7 {
|
subgraph cluster_7 {
|
||||||
color=blue
|
color=blue
|
||||||
18 [label="Enter when branch condition "];
|
19 [label="Enter when branch condition "];
|
||||||
19 [label="Access variable R|/SomeEnum.A1|"];
|
20 [label="Access qualifier /SomeEnum"];
|
||||||
20 [label="Operator =="];
|
21 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
21 [label="Exit when branch condition"];
|
22 [label="Operator =="];
|
||||||
|
23 [label="Exit when branch condition"];
|
||||||
}
|
}
|
||||||
subgraph cluster_8 {
|
subgraph cluster_8 {
|
||||||
color=blue
|
color=blue
|
||||||
22 [label="Enter when branch condition "];
|
24 [label="Enter when branch condition "];
|
||||||
23 [label="Access variable R|/SomeEnum.A2|"];
|
25 [label="Access qualifier /SomeEnum"];
|
||||||
24 [label="Operator =="];
|
26 [label="Access variable R|/SomeEnum.A2|"];
|
||||||
25 [label="Exit when branch condition"];
|
27 [label="Operator =="];
|
||||||
|
28 [label="Exit when branch condition"];
|
||||||
}
|
}
|
||||||
26 [label="Enter when branch result"];
|
29 [label="Enter when branch result"];
|
||||||
subgraph cluster_9 {
|
subgraph cluster_9 {
|
||||||
color=blue
|
color=blue
|
||||||
27 [label="Enter block"];
|
30 [label="Enter block"];
|
||||||
28 [label="Function call: R|/B.B|()"];
|
31 [label="Function call: R|/B.B|()"];
|
||||||
29 [label="Exit block"];
|
32 [label="Exit block"];
|
||||||
}
|
}
|
||||||
30 [label="Exit when branch result"];
|
33 [label="Exit when branch result"];
|
||||||
31 [label="Enter when branch result"];
|
34 [label="Enter when branch result"];
|
||||||
subgraph cluster_10 {
|
subgraph cluster_10 {
|
||||||
color=blue
|
color=blue
|
||||||
32 [label="Enter block"];
|
35 [label="Enter block"];
|
||||||
33 [label="Function call: R|/B.B|()"];
|
36 [label="Function call: R|/B.B|()"];
|
||||||
34 [label="Exit block"];
|
37 [label="Exit block"];
|
||||||
}
|
}
|
||||||
35 [label="Exit when branch result"];
|
38 [label="Exit when branch result"];
|
||||||
36 [label="Exit when"];
|
39 [label="Exit when"];
|
||||||
}
|
}
|
||||||
37 [label="Variable declaration: lval b: R|B|"];
|
40 [label="Variable declaration: lval b: R|B|"];
|
||||||
38 [label="Access variable R|<local>/b|"];
|
41 [label="Access variable R|<local>/b|"];
|
||||||
39 [label="Function call: R|/takeB|(...)"];
|
42 [label="Function call: R|/takeB|(...)"];
|
||||||
40 [label="Exit function test_1" style="filled" fillcolor=red];
|
43 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
12 -> {13};
|
12 -> {13};
|
||||||
@@ -104,159 +107,165 @@ digraph exhaustiveWhenAndDNNType_kt {
|
|||||||
18 -> {19};
|
18 -> {19};
|
||||||
19 -> {20};
|
19 -> {20};
|
||||||
20 -> {21};
|
20 -> {21};
|
||||||
21 -> {31 22};
|
21 -> {22};
|
||||||
22 -> {23};
|
22 -> {23};
|
||||||
23 -> {24};
|
23 -> {34 24};
|
||||||
24 -> {25};
|
24 -> {25};
|
||||||
25 -> {26};
|
25 -> {26};
|
||||||
26 -> {27};
|
26 -> {27};
|
||||||
27 -> {28};
|
27 -> {28};
|
||||||
28 -> {29};
|
28 -> {29};
|
||||||
29 -> {30};
|
29 -> {30};
|
||||||
30 -> {36};
|
30 -> {31};
|
||||||
31 -> {32};
|
31 -> {32};
|
||||||
32 -> {33};
|
32 -> {33};
|
||||||
33 -> {34};
|
33 -> {39};
|
||||||
34 -> {35};
|
34 -> {35};
|
||||||
35 -> {36};
|
35 -> {36};
|
||||||
36 -> {37};
|
36 -> {37};
|
||||||
37 -> {38};
|
37 -> {38};
|
||||||
38 -> {39};
|
38 -> {39};
|
||||||
39 -> {40};
|
39 -> {40};
|
||||||
|
40 -> {41};
|
||||||
|
41 -> {42};
|
||||||
|
42 -> {43};
|
||||||
|
|
||||||
subgraph cluster_11 {
|
subgraph cluster_11 {
|
||||||
color=red
|
color=red
|
||||||
41 [label="Enter function test_2" style="filled" fillcolor=red];
|
44 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||||
42 [label="Access variable R|/SomeEnum.A1|"];
|
45 [label="Access qualifier /SomeEnum"];
|
||||||
43 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
46 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
|
47 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
||||||
subgraph cluster_12 {
|
subgraph cluster_12 {
|
||||||
color=blue
|
color=blue
|
||||||
44 [label="Enter when"];
|
48 [label="Enter when"];
|
||||||
45 [label="Access variable R|<local>/flag|"];
|
49 [label="Access variable R|<local>/flag|"];
|
||||||
46 [label="Check not null: R|<local>/flag|!!"];
|
50 [label="Check not null: R|<local>/flag|!!"];
|
||||||
subgraph cluster_13 {
|
subgraph cluster_13 {
|
||||||
color=blue
|
color=blue
|
||||||
47 [label="Enter when branch condition "];
|
51 [label="Enter when branch condition "];
|
||||||
48 [label="Access variable R|/SomeEnum.A1|"];
|
52 [label="Access qualifier /SomeEnum"];
|
||||||
49 [label="Operator =="];
|
53 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
50 [label="Exit when branch condition"];
|
54 [label="Operator =="];
|
||||||
|
55 [label="Exit when branch condition"];
|
||||||
}
|
}
|
||||||
subgraph cluster_14 {
|
subgraph cluster_14 {
|
||||||
color=blue
|
color=blue
|
||||||
51 [label="Enter when branch condition "];
|
56 [label="Enter when branch condition "];
|
||||||
52 [label="Access variable R|/SomeEnum.A2|"];
|
57 [label="Access qualifier /SomeEnum"];
|
||||||
53 [label="Operator =="];
|
58 [label="Access variable R|/SomeEnum.A2|"];
|
||||||
54 [label="Exit when branch condition"];
|
59 [label="Operator =="];
|
||||||
|
60 [label="Exit when branch condition"];
|
||||||
}
|
}
|
||||||
55 [label="Enter when branch result"];
|
61 [label="Enter when branch result"];
|
||||||
subgraph cluster_15 {
|
subgraph cluster_15 {
|
||||||
color=blue
|
color=blue
|
||||||
56 [label="Enter block"];
|
62 [label="Enter block"];
|
||||||
57 [label="Function call: R|/B.B|()"];
|
63 [label="Function call: R|/B.B|()"];
|
||||||
58 [label="Exit block"];
|
64 [label="Exit block"];
|
||||||
}
|
}
|
||||||
59 [label="Exit when branch result"];
|
65 [label="Exit when branch result"];
|
||||||
60 [label="Enter when branch result"];
|
66 [label="Enter when branch result"];
|
||||||
subgraph cluster_16 {
|
subgraph cluster_16 {
|
||||||
color=blue
|
color=blue
|
||||||
61 [label="Enter block"];
|
67 [label="Enter block"];
|
||||||
62 [label="Function call: R|/B.B|()"];
|
68 [label="Function call: R|/B.B|()"];
|
||||||
63 [label="Exit block"];
|
69 [label="Exit block"];
|
||||||
}
|
}
|
||||||
64 [label="Exit when branch result"];
|
70 [label="Exit when branch result"];
|
||||||
65 [label="Exit when"];
|
71 [label="Exit when"];
|
||||||
}
|
}
|
||||||
66 [label="Variable declaration: lval b: R|B|"];
|
72 [label="Variable declaration: lval b: R|B|"];
|
||||||
67 [label="Access variable R|<local>/b|"];
|
73 [label="Access variable R|<local>/b|"];
|
||||||
68 [label="Function call: R|/takeB|(...)"];
|
74 [label="Function call: R|/takeB|(...)"];
|
||||||
69 [label="Exit function test_2" style="filled" fillcolor=red];
|
75 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
41 -> {42};
|
|
||||||
42 -> {43};
|
|
||||||
43 -> {44};
|
|
||||||
44 -> {45};
|
44 -> {45};
|
||||||
45 -> {46};
|
45 -> {46};
|
||||||
46 -> {47};
|
46 -> {47};
|
||||||
47 -> {48};
|
47 -> {48};
|
||||||
48 -> {49};
|
48 -> {49};
|
||||||
49 -> {50};
|
49 -> {50};
|
||||||
50 -> {60 51};
|
50 -> {51};
|
||||||
51 -> {52};
|
51 -> {52};
|
||||||
52 -> {53};
|
52 -> {53};
|
||||||
53 -> {54};
|
53 -> {54};
|
||||||
54 -> {55};
|
54 -> {55};
|
||||||
55 -> {56};
|
55 -> {66 56};
|
||||||
56 -> {57};
|
56 -> {57};
|
||||||
57 -> {58};
|
57 -> {58};
|
||||||
58 -> {59};
|
58 -> {59};
|
||||||
59 -> {65};
|
59 -> {60};
|
||||||
60 -> {61};
|
60 -> {61};
|
||||||
61 -> {62};
|
61 -> {62};
|
||||||
62 -> {63};
|
62 -> {63};
|
||||||
63 -> {64};
|
63 -> {64};
|
||||||
64 -> {65};
|
64 -> {65};
|
||||||
65 -> {66};
|
65 -> {71};
|
||||||
66 -> {67};
|
66 -> {67};
|
||||||
67 -> {68};
|
67 -> {68};
|
||||||
68 -> {69};
|
68 -> {69};
|
||||||
|
69 -> {70};
|
||||||
subgraph cluster_17 {
|
|
||||||
color=red
|
|
||||||
70 [label="Enter function test_3" style="filled" fillcolor=red];
|
|
||||||
71 [label="Access variable R|/SomeEnum.A1|"];
|
|
||||||
72 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
|
||||||
subgraph cluster_18 {
|
|
||||||
color=blue
|
|
||||||
73 [label="Enter when"];
|
|
||||||
74 [label="Access variable R|<local>/flag|"];
|
|
||||||
subgraph cluster_19 {
|
|
||||||
color=blue
|
|
||||||
75 [label="Enter when branch condition "];
|
|
||||||
76 [label="Access variable R|/SomeEnum.A1|"];
|
|
||||||
77 [label="Operator =="];
|
|
||||||
78 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_20 {
|
|
||||||
color=blue
|
|
||||||
79 [label="Enter when branch condition "];
|
|
||||||
80 [label="Access variable R|/SomeEnum.A2|"];
|
|
||||||
81 [label="Operator =="];
|
|
||||||
82 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
83 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_21 {
|
|
||||||
color=blue
|
|
||||||
84 [label="Enter block"];
|
|
||||||
85 [label="Function call: R|/B.B|()"];
|
|
||||||
86 [label="Exit block"];
|
|
||||||
}
|
|
||||||
87 [label="Exit when branch result"];
|
|
||||||
88 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_22 {
|
|
||||||
color=blue
|
|
||||||
89 [label="Enter block"];
|
|
||||||
90 [label="Function call: R|/B.B|()"];
|
|
||||||
91 [label="Exit block"];
|
|
||||||
}
|
|
||||||
92 [label="Exit when branch result"];
|
|
||||||
93 [label="Exit when"];
|
|
||||||
}
|
|
||||||
94 [label="Variable declaration: lval b: R|B|"];
|
|
||||||
95 [label="Access variable R|<local>/b|"];
|
|
||||||
96 [label="Function call: R|/takeB|(...)"];
|
|
||||||
97 [label="Exit function test_3" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
|
|
||||||
70 -> {71};
|
70 -> {71};
|
||||||
71 -> {72};
|
71 -> {72};
|
||||||
72 -> {73};
|
72 -> {73};
|
||||||
73 -> {74};
|
73 -> {74};
|
||||||
74 -> {75};
|
74 -> {75};
|
||||||
75 -> {76};
|
|
||||||
|
subgraph cluster_17 {
|
||||||
|
color=red
|
||||||
|
76 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||||
|
77 [label="Access qualifier /SomeEnum"];
|
||||||
|
78 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
|
79 [label="Variable declaration: lval flag: R|SomeEnum|"];
|
||||||
|
subgraph cluster_18 {
|
||||||
|
color=blue
|
||||||
|
80 [label="Enter when"];
|
||||||
|
81 [label="Access variable R|<local>/flag|"];
|
||||||
|
subgraph cluster_19 {
|
||||||
|
color=blue
|
||||||
|
82 [label="Enter when branch condition "];
|
||||||
|
83 [label="Access qualifier /SomeEnum"];
|
||||||
|
84 [label="Access variable R|/SomeEnum.A1|"];
|
||||||
|
85 [label="Operator =="];
|
||||||
|
86 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
subgraph cluster_20 {
|
||||||
|
color=blue
|
||||||
|
87 [label="Enter when branch condition "];
|
||||||
|
88 [label="Access qualifier /SomeEnum"];
|
||||||
|
89 [label="Access variable R|/SomeEnum.A2|"];
|
||||||
|
90 [label="Operator =="];
|
||||||
|
91 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
92 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_21 {
|
||||||
|
color=blue
|
||||||
|
93 [label="Enter block"];
|
||||||
|
94 [label="Function call: R|/B.B|()"];
|
||||||
|
95 [label="Exit block"];
|
||||||
|
}
|
||||||
|
96 [label="Exit when branch result"];
|
||||||
|
97 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_22 {
|
||||||
|
color=blue
|
||||||
|
98 [label="Enter block"];
|
||||||
|
99 [label="Function call: R|/B.B|()"];
|
||||||
|
100 [label="Exit block"];
|
||||||
|
}
|
||||||
|
101 [label="Exit when branch result"];
|
||||||
|
102 [label="Exit when"];
|
||||||
|
}
|
||||||
|
103 [label="Variable declaration: lval b: R|B|"];
|
||||||
|
104 [label="Access variable R|<local>/b|"];
|
||||||
|
105 [label="Function call: R|/takeB|(...)"];
|
||||||
|
106 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
76 -> {77};
|
76 -> {77};
|
||||||
77 -> {78};
|
77 -> {78};
|
||||||
78 -> {88 79};
|
78 -> {79};
|
||||||
79 -> {80};
|
79 -> {80};
|
||||||
80 -> {81};
|
80 -> {81};
|
||||||
81 -> {82};
|
81 -> {82};
|
||||||
@@ -264,8 +273,8 @@ digraph exhaustiveWhenAndDNNType_kt {
|
|||||||
83 -> {84};
|
83 -> {84};
|
||||||
84 -> {85};
|
84 -> {85};
|
||||||
85 -> {86};
|
85 -> {86};
|
||||||
86 -> {87};
|
86 -> {97 87};
|
||||||
87 -> {93};
|
87 -> {88};
|
||||||
88 -> {89};
|
88 -> {89};
|
||||||
89 -> {90};
|
89 -> {90};
|
||||||
90 -> {91};
|
90 -> {91};
|
||||||
@@ -274,6 +283,15 @@ digraph exhaustiveWhenAndDNNType_kt {
|
|||||||
93 -> {94};
|
93 -> {94};
|
||||||
94 -> {95};
|
94 -> {95};
|
||||||
95 -> {96};
|
95 -> {96};
|
||||||
96 -> {97};
|
96 -> {102};
|
||||||
|
97 -> {98};
|
||||||
|
98 -> {99};
|
||||||
|
99 -> {100};
|
||||||
|
100 -> {101};
|
||||||
|
101 -> {102};
|
||||||
|
102 -> {103};
|
||||||
|
103 -> {104};
|
||||||
|
104 -> {105};
|
||||||
|
105 -> {106};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
@@ -606,6 +606,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt");
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaReturningObject.kt")
|
||||||
|
public void testLambdaReturningObject() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("lambdas.kt")
|
@TestMetadata("lambdas.kt")
|
||||||
public void testLambdas() throws Exception {
|
public void testLambdas() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdas.kt");
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdas.kt");
|
||||||
|
|||||||
Generated
+5
@@ -606,6 +606,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt");
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("lambdaReturningObject.kt")
|
||||||
|
public void testLambdaReturningObject() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("lambdas.kt")
|
@TestMetadata("lambdas.kt")
|
||||||
public void testLambdas() throws Exception {
|
public void testLambdas() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdas.kt");
|
runTest("compiler/fir/resolve/testData/resolve/cfg/lambdas.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user