[FIR] Add checker for uninitialized properties

This commit is contained in:
Dmitriy Novozhilov
2020-06-17 11:51:15 +03:00
parent 25621d699b
commit 26458875d5
96 changed files with 1476 additions and 1358 deletions
@@ -5,19 +5,19 @@ digraph annotatedLocalClass_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class Ann" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class Ann" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter class Ann" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Exit class Ann" style="filled" fillcolor=red]; 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
} }
3 -> {4} [color=green]; 2 -> {3};
3 -> {4};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,17 +5,17 @@ digraph complex_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function close" style="filled" fillcolor=red]; 0 [label="Enter class AutoCloseable" style="filled" fillcolor=red];
1 [label="Exit function close" style="filled" fillcolor=red]; 1 [label="Exit class AutoCloseable" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class AutoCloseable" style="filled" fillcolor=red]; 2 [label="Enter function close" style="filled" fillcolor=red];
3 [label="Exit class AutoCloseable" style="filled" fillcolor=red]; 3 [label="Exit function close" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,81 +5,81 @@ digraph initBlock_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class Foo" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_1 {
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
subgraph cluster_1 {
color=red
9 [label="Enter class Foo" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue color=blue
3 [label="Enter init block" style="filled" fillcolor=red]; 2 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_3 { subgraph cluster_2 {
color=blue color=blue
4 [label="Enter block"]; 3 [label="Enter block"];
5 [label="Const: Int(1)"]; 4 [label="Const: Int(1)"];
6 [label="Variable declaration: lval x: R|kotlin/Int|"]; 5 [label="Variable declaration: lval x: R|kotlin/Int|"];
7 [label="Exit block"]; 6 [label="Exit block"];
} }
8 [label="Exit init block" style="filled" fillcolor=red]; 7 [label="Exit init block" style="filled" fillcolor=red];
} }
10 [label="Exit class Foo" style="filled" fillcolor=red]; 1 [label="Exit class Foo" style="filled" fillcolor=red];
} }
9 -> {3} [color=green]; 0 -> {2} [color=green];
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5}; 4 -> {5};
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
7 -> {8}; 7 -> {1} [color=green];
8 -> {10} [color=green];
subgraph cluster_3 {
color=red
8 [label="Enter function <init>" style="filled" fillcolor=red];
9 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
10 [label="Exit function <init>" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
11 [label="Enter function <init>" style="filled" fillcolor=red]; 11 [label="Enter class Bar" style="filled" fillcolor=red];
12 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_5 {
13 [label="Exit function <init>" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13};
subgraph cluster_5 {
color=red
25 [label="Enter class Bar" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue color=blue
14 [label="Enter init block" style="filled" fillcolor=red]; 13 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_7 { subgraph cluster_6 {
color=blue color=blue
15 [label="Enter block"]; 14 [label="Enter block"];
16 [label="Const: Int(1)"]; 15 [label="Const: Int(1)"];
17 [label="Variable declaration: lval x: R|kotlin/Int|"]; 16 [label="Variable declaration: lval x: R|kotlin/Int|"];
18 [label="Function call: R|java/lang/Exception.Exception|()"]; 17 [label="Function call: R|java/lang/Exception.Exception|()"];
19 [label="Throw: throw R|java/lang/Exception.Exception|()"]; 18 [label="Throw: throw R|java/lang/Exception.Exception|()"];
20 [label="Stub" style="filled" fillcolor=gray]; 19 [label="Stub" style="filled" fillcolor=gray];
21 [label="Const: Int(2)" style="filled" fillcolor=gray]; 20 [label="Const: Int(2)" style="filled" fillcolor=gray];
22 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray]; 21 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray];
23 [label="Exit block" style="filled" fillcolor=gray]; 22 [label="Exit block" style="filled" fillcolor=gray];
} }
24 [label="Exit init block" style="filled" fillcolor=red]; 23 [label="Exit init block" style="filled" fillcolor=red];
} }
26 [label="Exit class Bar" style="filled" fillcolor=red]; 12 [label="Exit class Bar" style="filled" fillcolor=red];
} }
25 -> {14} [color=green]; 11 -> {13} [color=green];
13 -> {14};
14 -> {15}; 14 -> {15};
15 -> {16}; 15 -> {16};
16 -> {17}; 16 -> {17};
17 -> {18}; 17 -> {18};
18 -> {19}; 18 -> {23};
19 -> {24}; 18 -> {19} [style=dotted];
19 -> {20} [style=dotted]; 19 -> {20} [style=dotted];
20 -> {21} [style=dotted]; 20 -> {21} [style=dotted];
21 -> {22} [style=dotted]; 21 -> {22} [style=dotted];
22 -> {23} [style=dotted]; 22 -> {23} [style=dotted];
23 -> {24} [style=dotted]; 23 -> {12} [color=green];
24 -> {26} [color=green];
subgraph cluster_7 {
color=red
24 [label="Enter function <init>" style="filled" fillcolor=red];
25 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
26 [label="Exit function <init>" style="filled" fillcolor=red];
}
24 -> {25};
25 -> {26};
} }
@@ -12,86 +12,86 @@ digraph initBlockAndInPlaceLambda_kt {
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function getter" style="filled" fillcolor=red]; 2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit function getter" style="filled" fillcolor=red]; 3 [label="Exit class A" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3} [color=green];
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function getter" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function getter" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter function <init>" style="filled" fillcolor=red]; 6 [label="Enter class C" style="filled" fillcolor=red];
7 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_4 {
8 [label="Exit function <init>" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
subgraph cluster_4 {
color=red
29 [label="Enter class C" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue color=blue
16 [label="Enter init block" style="filled" fillcolor=red]; 8 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 { subgraph cluster_5 {
color=blue color=blue
17 [label="Enter block"]; 9 [label="Enter block"];
18 [label="Access variable R|<local>/a|"]; 10 [label="Access variable R|<local>/a|"];
19 [label="Access variable R|/A.b|"]; 11 [label="Access variable R|/A.b|"];
20 [label="Enter safe call"]; 12 [label="Enter safe call"];
21 [label="Postponed enter to lambda"]; 13 [label="Postponed enter to lambda"];
subgraph cluster_7 { subgraph cluster_6 {
color=blue color=blue
9 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 21 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_8 { subgraph cluster_7 {
color=blue color=blue
10 [label="Enter block"]; 22 [label="Enter block"];
11 [label="Access variable R|<local>/a|"]; 23 [label="Access variable R|<local>/a|"];
12 [label="Access variable R|<local>/it|"]; 24 [label="Access variable R|<local>/it|"];
13 [label="Function call: R|/C.C|(...)"]; 25 [label="Function call: R|/C.C|(...)"];
14 [label="Exit block"]; 26 [label="Exit block"];
} }
15 [label="Exit function anonymousFunction" style="filled" fillcolor=red]; 27 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
} }
22 [label="Call arguments union" style="filled" fillcolor=yellow]; 14 [label="Call arguments union" style="filled" fillcolor=yellow];
23 [label="Postponed exit from lambda"]; 15 [label="Postponed exit from lambda"];
24 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"]; 16 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"];
25 [label="Exit safe call"]; 17 [label="Exit safe call"];
26 [label="Variable declaration: lval c: R|C?|"]; 18 [label="Variable declaration: lval c: R|C?|"];
27 [label="Exit block"]; 19 [label="Exit block"];
} }
28 [label="Exit init block" style="filled" fillcolor=red]; 20 [label="Exit init block" style="filled" fillcolor=red];
} }
30 [label="Exit class C" style="filled" fillcolor=red]; 7 [label="Exit class C" style="filled" fillcolor=red];
} }
29 -> {16} [color=green]; 6 -> {8} [color=green];
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12 17};
12 -> {13};
13 -> {21};
13 -> {15} [color=red];
14 -> {16} [color=red];
15 -> {16} [color=green];
16 -> {17}; 16 -> {17};
17 -> {18}; 17 -> {18};
18 -> {19}; 18 -> {19};
19 -> {20 25}; 19 -> {20};
20 -> {21}; 20 -> {7} [color=green];
21 -> {9}; 21 -> {22};
21 -> {23} [color=red]; 22 -> {23};
22 -> {24} [color=red]; 23 -> {24};
23 -> {24} [color=green];
24 -> {25}; 24 -> {25};
25 -> {26}; 25 -> {26};
26 -> {27}; 26 -> {27};
27 -> {28}; 27 -> {15} [color=green];
28 -> {30} [color=green]; 27 -> {14} [color=red];
9 -> {10};
10 -> {11}; subgraph cluster_8 {
11 -> {12}; color=red
12 -> {13}; 28 [label="Enter function <init>" style="filled" fillcolor=red];
13 -> {14}; 29 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
14 -> {15}; 30 [label="Exit function <init>" style="filled" fillcolor=red];
15 -> {23} [color=green]; }
15 -> {22} [color=red]; 28 -> {29};
29 -> {30};
} }
@@ -14,33 +14,33 @@ digraph innerClassInAnonymousObject_kt {
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter function <init>" style="filled" fillcolor=red]; 3 [label="Enter class Nested" style="filled" fillcolor=red];
4 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 4 [label="Exit class Nested" style="filled" fillcolor=red];
5 [label="Exit function <init>" style="filled" fillcolor=red];
} }
3 -> {4}; 3 -> {4} [color=green];
4 -> {5};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
6 [label="Enter function foo" style="filled" fillcolor=red]; 5 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_3 { 6 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 7 [label="Exit function <init>" style="filled" fillcolor=red];
7 [label="Enter block"];
8 [label="Exit block"];
}
9 [label="Exit function foo" style="filled" fillcolor=red];
} }
5 -> {6};
6 -> {7}; 6 -> {7};
7 -> {8};
8 -> {9};
subgraph cluster_4 { subgraph cluster_3 {
color=red color=red
10 [label="Enter class Nested" style="filled" fillcolor=red]; 8 [label="Enter function foo" style="filled" fillcolor=red];
11 [label="Exit class Nested" style="filled" fillcolor=red]; subgraph cluster_4 {
color=blue
9 [label="Enter block"];
10 [label="Exit block"];
}
11 [label="Exit function foo" style="filled" fillcolor=red];
} }
10 -> {11} [color=green]; 8 -> {9};
9 -> {10};
10 -> {11};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
@@ -61,7 +61,7 @@ digraph innerClassInAnonymousObject_kt {
18 [label="Exit property" style="filled" fillcolor=red]; 18 [label="Exit property" style="filled" fillcolor=red];
} }
16 -> {17}; 16 -> {17};
16 -> {0 3 6} [color=red]; 16 -> {0 5 8} [color=red];
17 -> {18}; 17 -> {18};
12 -> {13} [color=green]; 12 -> {13} [color=green];
@@ -33,19 +33,19 @@ digraph lambdaReturningObject_kt {
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
8 [label="Enter function <init>" style="filled" fillcolor=red]; 8 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red];
9 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 9 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red];
10 [label="Exit function <init>" style="filled" fillcolor=red];
} }
8 -> {9}; 8 -> {9} [color=green];
9 -> {10};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
11 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red]; 10 [label="Enter function <init>" style="filled" fillcolor=red];
12 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red]; 11 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
12 [label="Exit function <init>" style="filled" fillcolor=red];
} }
11 -> {12} [color=green]; 10 -> {11};
11 -> {12};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
@@ -5,111 +5,111 @@ digraph postponedLambdaInConstructor_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class A" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
} }
3 -> {4} [color=green]; 2 -> {3};
3 -> {4};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
5 [label="Enter function <init>" style="filled" fillcolor=red]; 5 [label="Enter class B" style="filled" fillcolor=red];
6 [label="Access variable R|<local>/s|"];
7 [label="Postponed enter to lambda"];
subgraph cluster_3 { subgraph cluster_3 {
color=blue color=blue
13 [label="Enter function anonymousFunction" style="filled" fillcolor=red]; 7 [label="Enter property" style="filled" fillcolor=red];
subgraph cluster_4 { 8 [label="Access variable R|<local>/s|"];
color=blue 9 [label="Exit property" style="filled" fillcolor=red];
14 [label="Enter block"];
15 [label="Postponed enter to lambda"];
subgraph cluster_5 {
color=blue
19 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|<local>/it|"];
22 [label="Exit block"];
}
23 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
16 [label="Postponed exit from lambda"];
17 [label="Exit block"];
}
18 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
} }
8 [label="Postponed exit from lambda"]; 6 [label="Exit class B" style="filled" fillcolor=red];
9 [label="Function call: R|<local>/s|.R|kotlin/let|<R|kotlin/String|, R|() -> kotlin/String|>(...)"];
10 [label="Call arguments union" style="filled" fillcolor=yellow];
11 [label="Delegated constructor call: super<R|A|>(...)"];
12 [label="Exit function <init>" style="filled" fillcolor=red];
} }
5 -> {6}; 5 -> {7} [color=green];
6 -> {7}; 7 -> {8};
7 -> {13};
7 -> {8} [color=red];
8 -> {9}; 8 -> {9};
9 -> {10}; 9 -> {6} [color=green];
subgraph cluster_4 {
color=red
10 [label="Enter function <init>" style="filled" fillcolor=red];
11 [label="Access variable R|<local>/s|"];
12 [label="Postponed enter to lambda"];
subgraph cluster_5 {
color=blue
18 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
19 [label="Enter block"];
20 [label="Postponed enter to lambda"];
subgraph cluster_7 {
color=blue
24 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
25 [label="Enter block"];
26 [label="Access variable R|<local>/it|"];
27 [label="Exit block"];
}
28 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
21 [label="Postponed exit from lambda"];
22 [label="Exit block"];
}
23 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
13 [label="Postponed exit from lambda"];
14 [label="Function call: R|<local>/s|.R|kotlin/let|<R|kotlin/String|, R|() -> kotlin/String|>(...)"];
15 [label="Call arguments union" style="filled" fillcolor=yellow];
16 [label="Delegated constructor call: super<R|A|>(...)"];
17 [label="Exit function <init>" style="filled" fillcolor=red];
}
10 -> {11}; 10 -> {11};
11 -> {12}; 11 -> {12};
12 -> {18};
12 -> {13} [color=red];
13 -> {14}; 13 -> {14};
14 -> {15}; 14 -> {15};
15 -> {16 19}; 15 -> {16};
16 -> {17}; 16 -> {17};
17 -> {18}; 18 -> {19};
18 -> {8} [color=green];
18 -> {10} [color=red];
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21 24};
21 -> {22}; 21 -> {22};
22 -> {23}; 22 -> {23};
23 -> {13} [color=green];
subgraph cluster_7 { 23 -> {15} [color=red];
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};
26 -> {27};
27 -> {28};
subgraph cluster_8 { subgraph cluster_9 {
color=red color=red
29 [label="Enter function foo" style="filled" fillcolor=red]; 29 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_9 { 30 [label="Exit function getter" style="filled" fillcolor=red];
color=blue
30 [label="Enter block"];
31 [label="Function call: this@R|/B|.R|/B.foo|()"];
32 [label="Exit block"];
}
33 [label="Exit function foo" style="filled" fillcolor=red];
} }
29 -> {30}; 29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
subgraph cluster_10 { subgraph cluster_10 {
color=red color=red
34 [label="Enter class B" style="filled" fillcolor=red]; 31 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_11 { subgraph cluster_11 {
color=blue color=blue
26 [label="Enter property" style="filled" fillcolor=red]; 32 [label="Enter block"];
27 [label="Access variable R|<local>/s|"]; 33 [label="Function call: this@R|/B|.R|/B.foo|()"];
28 [label="Exit property" style="filled" fillcolor=red]; 34 [label="Exit block"];
} }
35 [label="Exit class B" style="filled" fillcolor=red]; 35 [label="Exit function foo" style="filled" fillcolor=red];
} }
34 -> {26} [color=green]; 31 -> {32};
26 -> {27}; 32 -> {33};
27 -> {28}; 33 -> {34};
28 -> {35} [color=green]; 34 -> {35};
} }
@@ -12,35 +12,35 @@ digraph returnValuesFromLambda_kt {
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function <init>" style="filled" fillcolor=red]; 2 [label="Enter class B" style="filled" fillcolor=red];
3 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 3 [label="Exit class B" style="filled" fillcolor=red];
4 [label="Exit function <init>" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3} [color=green];
3 -> {4};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
5 [label="Enter class B" style="filled" fillcolor=red]; 4 [label="Enter function <init>" style="filled" fillcolor=red];
6 [label="Exit class B" style="filled" fillcolor=red]; 5 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
6 [label="Exit function <init>" style="filled" fillcolor=red];
} }
5 -> {6} [color=green]; 4 -> {5};
5 -> {6};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
7 [label="Enter function <init>" style="filled" fillcolor=red]; 7 [label="Enter class C" style="filled" fillcolor=red];
8 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 8 [label="Exit class C" style="filled" fillcolor=red];
9 [label="Exit function <init>" style="filled" fillcolor=red];
} }
7 -> {8}; 7 -> {8} [color=green];
8 -> {9};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
10 [label="Enter class C" style="filled" fillcolor=red]; 9 [label="Enter function <init>" style="filled" fillcolor=red];
11 [label="Exit class C" style="filled" fillcolor=red]; 10 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
11 [label="Exit function <init>" style="filled" fillcolor=red];
} }
10 -> {11} [color=green]; 9 -> {10};
10 -> {11};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
@@ -5,31 +5,31 @@ digraph safeCalls_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function bar" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function bar" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function bar" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function bar" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter function getter" style="filled" fillcolor=red]; 6 [label="Enter class B" style="filled" fillcolor=red];
7 [label="Exit function getter" style="filled" fillcolor=red]; 7 [label="Exit class B" style="filled" fillcolor=red];
} }
6 -> {7}; 6 -> {7} [color=green];
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -40,10 +40,10 @@ digraph safeCalls_kt {
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
10 [label="Enter class B" style="filled" fillcolor=red]; 10 [label="Enter function getter" style="filled" fillcolor=red];
11 [label="Exit class B" style="filled" fillcolor=red]; 11 [label="Exit function getter" style="filled" fillcolor=red];
} }
10 -> {11} [color=green]; 10 -> {11};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
@@ -5,63 +5,63 @@ digraph exhaustiveWhenAndDNNType_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class SomeEnum" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Enum<SomeEnum>|>()"]; 1 [label="Exit class SomeEnum" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter function values" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_2 { 3 [label="Delegated constructor call: super<R|kotlin/Enum<SomeEnum>|>()"];
color=blue 4 [label="Exit function <init>" style="filled" fillcolor=red];
4 [label="Enter block"];
5 [label="Exit block"];
}
6 [label="Exit function values" style="filled" fillcolor=red];
} }
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5};
5 -> {6};
subgraph cluster_3 { subgraph cluster_2 {
color=red color=red
7 [label="Enter function valueOf" style="filled" fillcolor=red]; 5 [label="Enter function values" style="filled" fillcolor=red];
subgraph cluster_4 { subgraph cluster_3 {
color=blue color=blue
8 [label="Enter block"]; 6 [label="Enter block"];
9 [label="Exit block"]; 7 [label="Exit block"];
} }
10 [label="Exit function valueOf" style="filled" fillcolor=red]; 8 [label="Exit function values" style="filled" fillcolor=red];
} }
5 -> {6};
6 -> {7};
7 -> {8}; 7 -> {8};
8 -> {9};
9 -> {10};
subgraph cluster_5 { subgraph cluster_4 {
color=red color=red
11 [label="Enter class SomeEnum" style="filled" fillcolor=red]; 9 [label="Enter function valueOf" style="filled" fillcolor=red];
12 [label="Exit class SomeEnum" style="filled" fillcolor=red]; subgraph cluster_5 {
color=blue
10 [label="Enter block"];
11 [label="Exit block"];
}
12 [label="Exit function valueOf" style="filled" fillcolor=red];
} }
11 -> {12} [color=green]; 9 -> {10};
10 -> {11};
11 -> {12};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
13 [label="Enter function <init>" style="filled" fillcolor=red]; 13 [label="Enter class B" style="filled" fillcolor=red];
14 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 14 [label="Exit class B" style="filled" fillcolor=red];
15 [label="Exit function <init>" style="filled" fillcolor=red];
} }
13 -> {14}; 13 -> {14} [color=green];
14 -> {15};
subgraph cluster_7 { subgraph cluster_7 {
color=red color=red
16 [label="Enter class B" style="filled" fillcolor=red]; 15 [label="Enter function <init>" style="filled" fillcolor=red];
17 [label="Exit class B" style="filled" fillcolor=red]; 16 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
17 [label="Exit function <init>" style="filled" fillcolor=red];
} }
16 -> {17} [color=green]; 15 -> {16};
16 -> {17};
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
@@ -5,112 +5,112 @@ digraph secondaryConstructorCfg_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class B" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_1 {
2 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 2 [label="Enter property" style="filled" fillcolor=red];
0 -> {1}; 3 [label="Access variable R|<local>/p0|"];
1 -> {2}; 4 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_1 { subgraph cluster_2 {
color=red color=blue
3 [label="Enter function getter" style="filled" fillcolor=red]; 5 [label="Enter property" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red]; 6 [label="Access variable R|<local>/p0|"];
7 [label="Access variable R|kotlin/String.length|"];
8 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_3 {
color=blue
9 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
10 [label="Enter block"];
11 [label="Access variable R|<local>/p0|"];
12 [label="Access variable R|kotlin/String.length|"];
13 [label="Assignment: R|/B.p1|"];
14 [label="Const: String()"];
15 [label="Assignment: R|/B.p3|"];
16 [label="Exit block"];
}
17 [label="Exit init block" style="filled" fillcolor=red];
}
1 [label="Exit class B" style="filled" fillcolor=red];
} }
0 -> {2} [color=green];
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5} [color=green];
subgraph cluster_2 { 5 -> {6};
color=red 6 -> {7};
8 [label="Enter function getter" style="filled" fillcolor=red]; 7 -> {8};
9 [label="Exit function getter" style="filled" fillcolor=red]; 8 -> {9} [color=green];
} 9 -> {10};
8 -> {9}; 10 -> {11};
11 -> {12};
subgraph cluster_3 { 12 -> {13};
color=red 13 -> {14};
14 [label="Enter function getter" style="filled" fillcolor=red];
15 [label="Exit function getter" style="filled" fillcolor=red];
}
14 -> {15}; 14 -> {15};
15 -> {16};
subgraph cluster_4 {
color=red
16 [label="Enter function setter" style="filled" fillcolor=red];
17 [label="Exit function setter" style="filled" fillcolor=red];
}
16 -> {17}; 16 -> {17};
17 -> {1} [color=green];
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
18 [label="Enter function <init>" style="filled" fillcolor=red]; 18 [label="Enter function <init>" style="filled" fillcolor=red];
19 [label="Access variable R|<local>/p0|"]; 19 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
20 [label="Delegated constructor call: this<R|B|>(...)"]; 20 [label="Exit function <init>" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/p1|"];
23 [label="Assignment: R|/B.p3|"];
24 [label="Exit block"];
}
25 [label="Exit function <init>" style="filled" fillcolor=red];
} }
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21};
subgraph cluster_6 {
color=red
21 [label="Enter function getter" style="filled" fillcolor=red];
22 [label="Exit function getter" style="filled" fillcolor=red];
}
21 -> {22}; 21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
subgraph cluster_7 { subgraph cluster_7 {
color=red color=red
35 [label="Enter class B" style="filled" fillcolor=red]; 23 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_8 { 24 [label="Exit function getter" style="filled" fillcolor=red];
color=blue }
5 [label="Enter property" style="filled" fillcolor=red]; 23 -> {24};
6 [label="Access variable R|<local>/p0|"];
7 [label="Exit property" style="filled" fillcolor=red]; subgraph cluster_8 {
} color=red
subgraph cluster_9 { 25 [label="Enter function getter" style="filled" fillcolor=red];
color=blue 26 [label="Exit function getter" style="filled" fillcolor=red];
10 [label="Enter property" style="filled" fillcolor=red]; }
11 [label="Access variable R|<local>/p0|"]; 25 -> {26};
12 [label="Access variable R|kotlin/String.length|"];
13 [label="Exit property" style="filled" fillcolor=red]; subgraph cluster_9 {
} color=red
subgraph cluster_10 { 27 [label="Enter function setter" style="filled" fillcolor=red];
color=blue 28 [label="Exit function setter" style="filled" fillcolor=red];
26 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
27 [label="Enter block"];
28 [label="Access variable R|<local>/p0|"];
29 [label="Access variable R|kotlin/String.length|"];
30 [label="Assignment: R|/B.p1|"];
31 [label="Const: String()"];
32 [label="Assignment: R|/B.p3|"];
33 [label="Exit block"];
}
34 [label="Exit init block" style="filled" fillcolor=red];
}
36 [label="Exit class B" style="filled" fillcolor=red];
} }
35 -> {5} [color=green];
5 -> {6};
6 -> {7};
7 -> {10} [color=green];
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {26} [color=green];
26 -> {27};
27 -> {28}; 27 -> {28};
28 -> {29};
subgraph cluster_10 {
color=red
29 [label="Enter function <init>" style="filled" fillcolor=red];
30 [label="Access variable R|<local>/p0|"];
31 [label="Delegated constructor call: this<R|B|>(...)"];
subgraph cluster_11 {
color=blue
32 [label="Enter block"];
33 [label="Access variable R|<local>/p1|"];
34 [label="Assignment: R|/B.p3|"];
35 [label="Exit block"];
}
36 [label="Exit function <init>" style="filled" fillcolor=red];
}
29 -> {30}; 29 -> {30};
30 -> {31}; 30 -> {31};
31 -> {32}; 31 -> {32};
32 -> {33}; 32 -> {33};
33 -> {34}; 33 -> {34};
34 -> {36} [color=green]; 34 -> {35};
35 -> {36};
} }
@@ -5,17 +5,17 @@ digraph bangbang_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,52 +5,52 @@ digraph booleanOperators_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function bool" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function bool" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function bool" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function bool" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter function bar" style="filled" fillcolor=red]; 6 [label="Enter class B" style="filled" fillcolor=red];
7 [label="Exit function bar" style="filled" fillcolor=red]; 7 [label="Exit class B" style="filled" fillcolor=red];
} }
6 -> {7}; 6 -> {7} [color=green];
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
8 [label="Enter class B" style="filled" fillcolor=red]; 8 [label="Enter function bar" style="filled" fillcolor=red];
9 [label="Exit class B" style="filled" fillcolor=red]; 9 [label="Exit function bar" style="filled" fillcolor=red];
} }
8 -> {9} [color=green]; 8 -> {9};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
10 [label="Enter function baz" style="filled" fillcolor=red]; 10 [label="Enter class C" style="filled" fillcolor=red];
11 [label="Exit function baz" style="filled" fillcolor=red]; 11 [label="Exit class C" style="filled" fillcolor=red];
} }
10 -> {11}; 10 -> {11} [color=green];
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
12 [label="Enter class C" style="filled" fillcolor=red]; 12 [label="Enter function baz" style="filled" fillcolor=red];
13 [label="Exit class C" style="filled" fillcolor=red]; 13 [label="Exit function baz" style="filled" fillcolor=red];
} }
12 -> {13} [color=green]; 12 -> {13};
subgraph cluster_7 { subgraph cluster_7 {
color=red color=red
@@ -5,24 +5,24 @@ digraph equalsToBoolean_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function getter" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function getter" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function getter" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function getter" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
@@ -5,17 +5,17 @@ digraph jumpFromRhsOfOperator_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,31 +5,31 @@ digraph boundSmartcasts_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter function bar" style="filled" fillcolor=red]; 4 [label="Enter class B" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red]; 5 [label="Exit class B" style="filled" fillcolor=red];
} }
4 -> {5}; 4 -> {5} [color=green];
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter class B" style="filled" fillcolor=red]; 6 [label="Enter function bar" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red]; 7 [label="Exit function bar" style="filled" fillcolor=red];
} }
6 -> {7} [color=green]; 6 -> {7};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -316,35 +316,35 @@ digraph boundSmartcasts_kt {
subgraph cluster_27 { subgraph cluster_27 {
color=red color=red
115 [label="Enter function <init>" style="filled" fillcolor=red]; 115 [label="Enter class D" style="filled" fillcolor=red];
116 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_28 {
117 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 117 [label="Enter property" style="filled" fillcolor=red];
115 -> {116}; 118 [label="Access variable R|<local>/any|"];
116 -> {117}; 119 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_28 { 116 [label="Exit class D" style="filled" fillcolor=red];
color=red
118 [label="Enter function getter" style="filled" fillcolor=red];
119 [label="Exit function getter" style="filled" fillcolor=red];
} }
115 -> {117} [color=green];
117 -> {118};
118 -> {119}; 118 -> {119};
119 -> {116} [color=green];
subgraph cluster_29 { subgraph cluster_29 {
color=red color=red
123 [label="Enter class D" style="filled" fillcolor=red]; 120 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_30 { 121 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 122 [label="Exit function <init>" style="filled" fillcolor=red];
120 [label="Enter property" style="filled" fillcolor=red];
121 [label="Access variable R|<local>/any|"];
122 [label="Exit property" style="filled" fillcolor=red];
}
124 [label="Exit class D" style="filled" fillcolor=red];
} }
123 -> {120} [color=green];
120 -> {121}; 120 -> {121};
121 -> {122}; 121 -> {122};
122 -> {124} [color=green];
subgraph cluster_30 {
color=red
123 [label="Enter function getter" style="filled" fillcolor=red];
124 [label="Exit function getter" style="filled" fillcolor=red];
}
123 -> {124};
subgraph cluster_31 { subgraph cluster_31 {
color=red color=red
@@ -5,35 +5,35 @@ digraph boundSmartcastsInBranches_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_1 {
2 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 2 [label="Enter property" style="filled" fillcolor=red];
0 -> {1}; 3 [label="Const: String()"];
1 -> {2}; 4 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_1 { 1 [label="Exit class A" style="filled" fillcolor=red];
color=red
3 [label="Enter function getter" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red];
} }
0 -> {2} [color=green];
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {1} [color=green];
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
8 [label="Enter class A" style="filled" fillcolor=red]; 5 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_3 { 6 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 7 [label="Exit function <init>" style="filled" fillcolor=red];
5 [label="Enter property" style="filled" fillcolor=red];
6 [label="Const: String()"];
7 [label="Exit property" style="filled" fillcolor=red];
}
9 [label="Exit class A" style="filled" fillcolor=red];
} }
8 -> {5} [color=green];
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
7 -> {9} [color=green];
subgraph cluster_3 {
color=red
8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function getter" style="filled" fillcolor=red];
}
8 -> {9};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -5,51 +5,51 @@ digraph functionCallBound_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class Base" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class Base" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter class Base" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Exit class Base" style="filled" fillcolor=red]; 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
} }
3 -> {4} [color=green]; 2 -> {3};
3 -> {4};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
5 [label="Enter function <init>" style="filled" fillcolor=red]; 5 [label="Enter class Sub" style="filled" fillcolor=red];
6 [label="Delegated constructor call: super<R|Base|>()"]; subgraph cluster_3 {
7 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 7 [label="Enter property" style="filled" fillcolor=red];
5 -> {6}; 8 [label="Access variable R|<local>/data|"];
6 -> {7}; 9 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_3 { 6 [label="Exit class Sub" style="filled" fillcolor=red];
color=red
8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function getter" style="filled" fillcolor=red];
} }
5 -> {7} [color=green];
7 -> {8};
8 -> {9}; 8 -> {9};
9 -> {6} [color=green];
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
13 [label="Enter class Sub" style="filled" fillcolor=red]; 10 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_5 { 11 [label="Delegated constructor call: super<R|Base|>()"];
color=blue 12 [label="Exit function <init>" style="filled" fillcolor=red];
10 [label="Enter property" style="filled" fillcolor=red];
11 [label="Access variable R|<local>/data|"];
12 [label="Exit property" style="filled" fillcolor=red];
}
14 [label="Exit class Sub" style="filled" fillcolor=red];
} }
13 -> {10} [color=green];
10 -> {11}; 10 -> {11};
11 -> {12}; 11 -> {12};
12 -> {14} [color=green];
subgraph cluster_5 {
color=red
13 [label="Enter function getter" style="filled" fillcolor=red];
14 [label="Exit function getter" style="filled" fillcolor=red];
}
13 -> {14};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
@@ -5,24 +5,24 @@ digraph elvis_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function getter" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function getter" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function getter" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function getter" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
@@ -148,45 +148,45 @@ digraph returns_kt {
subgraph cluster_14 { subgraph cluster_14 {
color=red color=red
50 [label="Enter function foo" style="filled" fillcolor=red]; 50 [label="Enter class A" style="filled" fillcolor=red];
51 [label="Exit function foo" style="filled" fillcolor=red]; 51 [label="Exit class A" style="filled" fillcolor=red];
} }
50 -> {51}; 50 -> {51} [color=green];
subgraph cluster_15 { subgraph cluster_15 {
color=red color=red
52 [label="Enter class A" style="filled" fillcolor=red]; 52 [label="Enter function foo" style="filled" fillcolor=red];
53 [label="Exit class A" style="filled" fillcolor=red]; 53 [label="Exit function foo" style="filled" fillcolor=red];
} }
52 -> {53} [color=green]; 52 -> {53};
subgraph cluster_16 { subgraph cluster_16 {
color=red color=red
54 [label="Enter function bar" style="filled" fillcolor=red]; 54 [label="Enter class B" style="filled" fillcolor=red];
55 [label="Exit function bar" style="filled" fillcolor=red]; 55 [label="Exit class B" style="filled" fillcolor=red];
} }
54 -> {55}; 54 -> {55} [color=green];
subgraph cluster_17 { subgraph cluster_17 {
color=red color=red
56 [label="Enter class B" style="filled" fillcolor=red]; 56 [label="Enter function bar" style="filled" fillcolor=red];
57 [label="Exit class B" style="filled" fillcolor=red]; 57 [label="Exit function bar" style="filled" fillcolor=red];
} }
56 -> {57} [color=green]; 56 -> {57};
subgraph cluster_18 { subgraph cluster_18 {
color=red color=red
58 [label="Enter function baz" style="filled" fillcolor=red]; 58 [label="Enter class C" style="filled" fillcolor=red];
59 [label="Exit function baz" style="filled" fillcolor=red]; 59 [label="Exit class C" style="filled" fillcolor=red];
} }
58 -> {59}; 58 -> {59} [color=green];
subgraph cluster_19 { subgraph cluster_19 {
color=red color=red
60 [label="Enter class C" style="filled" fillcolor=red]; 60 [label="Enter function baz" style="filled" fillcolor=red];
61 [label="Exit class C" style="filled" fillcolor=red]; 61 [label="Exit function baz" style="filled" fillcolor=red];
} }
60 -> {61} [color=green]; 60 -> {61};
subgraph cluster_20 { subgraph cluster_20 {
color=red color=red
@@ -5,17 +5,17 @@ digraph smartcastFromArgument_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,31 +5,31 @@ digraph when_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter function bar" style="filled" fillcolor=red]; 4 [label="Enter class B" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red]; 5 [label="Exit class B" style="filled" fillcolor=red];
} }
4 -> {5}; 4 -> {5} [color=green];
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter class B" style="filled" fillcolor=red]; 6 [label="Enter function bar" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red]; 7 [label="Exit function bar" style="filled" fillcolor=red];
} }
6 -> {7} [color=green]; 6 -> {7};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -5,17 +5,17 @@ digraph equalsAndIdentity_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,31 +5,31 @@ digraph inPlaceLambdas_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter function bar" style="filled" fillcolor=red]; 4 [label="Enter class B" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red]; 5 [label="Exit class B" style="filled" fillcolor=red];
} }
4 -> {5}; 4 -> {5} [color=green];
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter class B" style="filled" fillcolor=red]; 6 [label="Enter function bar" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red]; 7 [label="Exit function bar" style="filled" fillcolor=red];
} }
6 -> {7} [color=green]; 6 -> {7};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -5,17 +5,17 @@ digraph dataFlowInfoFromWhileCondition_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,17 +5,17 @@ digraph endlessLoops_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -5,31 +5,31 @@ digraph multipleCasts_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter class A" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3} [color=green]; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter function foo" style="filled" fillcolor=red]; 4 [label="Enter class B" style="filled" fillcolor=red];
5 [label="Exit function foo" style="filled" fillcolor=red]; 5 [label="Exit class B" style="filled" fillcolor=red];
} }
4 -> {5}; 4 -> {5} [color=green];
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter class B" style="filled" fillcolor=red]; 6 [label="Enter function foo" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red]; 7 [label="Exit function foo" style="filled" fillcolor=red];
} }
6 -> {7} [color=green]; 6 -> {7};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -5,237 +5,237 @@ digraph nullability_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function foo" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function getA" style="filled" fillcolor=red]; 2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function getA" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class A" style="filled" fillcolor=red]; 4 [label="Enter function getA" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red]; 5 [label="Exit function getA" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
6 [label="Enter function getter" style="filled" fillcolor=red]; 6 [label="Enter class MyData" style="filled" fillcolor=red];
7 [label="Exit function getter" style="filled" fillcolor=red]; 7 [label="Exit class MyData" style="filled" fillcolor=red];
} }
6 -> {7}; 6 -> {7} [color=green];
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
8 [label="Enter function fs" style="filled" fillcolor=red]; 8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function fs" style="filled" fillcolor=red]; 9 [label="Exit function getter" style="filled" fillcolor=red];
} }
8 -> {9}; 8 -> {9};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
10 [label="Enter class MyData" style="filled" fillcolor=red]; 10 [label="Enter function fs" style="filled" fillcolor=red];
11 [label="Exit class MyData" style="filled" fillcolor=red]; 11 [label="Exit function fs" style="filled" fillcolor=red];
} }
10 -> {11} [color=green]; 10 -> {11};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
12 [label="Enter function getter" style="filled" fillcolor=red]; 12 [label="Enter class Q" style="filled" fillcolor=red];
13 [label="Exit function getter" style="filled" fillcolor=red]; 13 [label="Exit class Q" style="filled" fillcolor=red];
} }
12 -> {13}; 12 -> {13} [color=green];
subgraph cluster_7 { subgraph cluster_7 {
color=red color=red
14 [label="Enter function fdata" style="filled" fillcolor=red]; 14 [label="Enter function getter" style="filled" fillcolor=red];
15 [label="Exit function fdata" style="filled" fillcolor=red]; 15 [label="Exit function getter" style="filled" fillcolor=red];
} }
14 -> {15}; 14 -> {15};
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
16 [label="Enter class Q" style="filled" fillcolor=red]; 16 [label="Enter function fdata" style="filled" fillcolor=red];
17 [label="Exit class Q" style="filled" fillcolor=red]; 17 [label="Exit function fdata" style="filled" fillcolor=red];
} }
16 -> {17} [color=green]; 16 -> {17};
subgraph cluster_9 { subgraph cluster_9 {
color=red color=red
18 [label="Enter function <init>" style="filled" fillcolor=red]; 18 [label="Enter class QImpl" style="filled" fillcolor=red];
19 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_10 {
20 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 20 [label="Enter property" style="filled" fillcolor=red];
18 -> {19}; 21 [label="Access variable R|<local>/data|"];
19 -> {20}; 22 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_10 { 19 [label="Exit class QImpl" style="filled" fillcolor=red];
color=red
21 [label="Enter function getter" style="filled" fillcolor=red];
22 [label="Exit function getter" style="filled" fillcolor=red];
} }
18 -> {20} [color=green];
20 -> {21};
21 -> {22}; 21 -> {22};
22 -> {19} [color=green];
subgraph cluster_11 { subgraph cluster_11 {
color=red color=red
26 [label="Enter function fdata" style="filled" fillcolor=red]; 23 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_12 { 24 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 25 [label="Exit function <init>" style="filled" fillcolor=red];
27 [label="Enter block"]; }
28 [label="Const: Null(null)"]; 23 -> {24};
29 [label="Jump: ^fdata Null(null)"]; 24 -> {25};
30 [label="Stub" style="filled" fillcolor=gray];
31 [label="Exit block" style="filled" fillcolor=gray]; subgraph cluster_12 {
} color=red
32 [label="Exit function fdata" style="filled" fillcolor=red]; 26 [label="Enter function getter" style="filled" fillcolor=red];
27 [label="Exit function getter" style="filled" fillcolor=red];
} }
26 -> {27}; 26 -> {27};
27 -> {28};
28 -> {29};
29 -> {32};
29 -> {30} [style=dotted];
30 -> {31} [style=dotted];
31 -> {32} [style=dotted];
subgraph cluster_13 { subgraph cluster_13 {
color=red color=red
33 [label="Enter class QImpl" style="filled" fillcolor=red]; 28 [label="Enter function fdata" style="filled" fillcolor=red];
subgraph cluster_14 { subgraph cluster_14 {
color=blue color=blue
23 [label="Enter property" style="filled" fillcolor=red]; 29 [label="Enter block"];
24 [label="Access variable R|<local>/data|"]; 30 [label="Const: Null(null)"];
25 [label="Exit property" style="filled" fillcolor=red]; 31 [label="Jump: ^fdata Null(null)"];
32 [label="Stub" style="filled" fillcolor=gray];
33 [label="Exit block" style="filled" fillcolor=gray];
} }
34 [label="Exit class QImpl" style="filled" fillcolor=red]; 34 [label="Exit function fdata" style="filled" fillcolor=red];
} }
33 -> {23} [color=green]; 28 -> {29};
23 -> {24}; 29 -> {30};
24 -> {25}; 30 -> {31};
25 -> {34} [color=green]; 31 -> {34};
31 -> {32} [style=dotted];
32 -> {33} [style=dotted];
33 -> {34} [style=dotted];
subgraph cluster_15 { subgraph cluster_15 {
color=red color=red
35 [label="Enter function <init>" style="filled" fillcolor=red]; 35 [label="Enter class QImplMutable" style="filled" fillcolor=red];
36 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_16 {
37 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 37 [label="Enter property" style="filled" fillcolor=red];
35 -> {36}; 38 [label="Access variable R|<local>/data|"];
36 -> {37}; 39 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_16 { 36 [label="Exit class QImplMutable" style="filled" fillcolor=red];
color=red
38 [label="Enter function getter" style="filled" fillcolor=red];
39 [label="Exit function getter" style="filled" fillcolor=red];
} }
35 -> {37} [color=green];
37 -> {38};
38 -> {39}; 38 -> {39};
39 -> {36} [color=green];
subgraph cluster_17 { subgraph cluster_17 {
color=red color=red
40 [label="Enter function setter" style="filled" fillcolor=red]; 40 [label="Enter function <init>" style="filled" fillcolor=red];
41 [label="Exit function setter" style="filled" fillcolor=red]; 41 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
42 [label="Exit function <init>" style="filled" fillcolor=red];
} }
40 -> {41}; 40 -> {41};
41 -> {42};
subgraph cluster_18 { subgraph cluster_18 {
color=red color=red
45 [label="Enter function fdata" style="filled" fillcolor=red]; 43 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_19 { 44 [label="Exit function getter" style="filled" fillcolor=red];
color=blue }
46 [label="Enter block"]; 43 -> {44};
47 [label="Const: Null(null)"];
48 [label="Jump: ^fdata Null(null)"]; subgraph cluster_19 {
49 [label="Stub" style="filled" fillcolor=gray]; color=red
50 [label="Exit block" style="filled" fillcolor=gray]; 45 [label="Enter function setter" style="filled" fillcolor=red];
} 46 [label="Exit function setter" style="filled" fillcolor=red];
51 [label="Exit function fdata" style="filled" fillcolor=red];
} }
45 -> {46}; 45 -> {46};
46 -> {47};
47 -> {48};
48 -> {51};
48 -> {49} [style=dotted];
49 -> {50} [style=dotted];
50 -> {51} [style=dotted];
subgraph cluster_20 { subgraph cluster_20 {
color=red color=red
52 [label="Enter class QImplMutable" style="filled" fillcolor=red]; 47 [label="Enter function fdata" style="filled" fillcolor=red];
subgraph cluster_21 { subgraph cluster_21 {
color=blue color=blue
42 [label="Enter property" style="filled" fillcolor=red]; 48 [label="Enter block"];
43 [label="Access variable R|<local>/data|"]; 49 [label="Const: Null(null)"];
44 [label="Exit property" style="filled" fillcolor=red]; 50 [label="Jump: ^fdata Null(null)"];
51 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit block" style="filled" fillcolor=gray];
} }
53 [label="Exit class QImplMutable" style="filled" fillcolor=red]; 53 [label="Exit function fdata" style="filled" fillcolor=red];
} }
52 -> {42} [color=green]; 47 -> {48};
42 -> {43}; 48 -> {49};
43 -> {44}; 49 -> {50};
44 -> {53} [color=green]; 50 -> {53};
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
subgraph cluster_22 { subgraph cluster_22 {
color=red color=red
54 [label="Enter function <init>" style="filled" fillcolor=red]; 54 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red];
55 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 55 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red];
56 [label="Exit function <init>" style="filled" fillcolor=red];
} }
54 -> {55}; 54 -> {55} [color=green];
55 -> {56};
subgraph cluster_23 { subgraph cluster_23 {
color=red color=red
57 [label="Enter function getter" style="filled" fillcolor=red]; 56 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_24 { 57 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 58 [label="Exit function <init>" style="filled" fillcolor=red];
58 [label="Enter block"];
59 [label="Const: Null(null)"];
60 [label="Jump: ^ Null(null)"];
61 [label="Stub" style="filled" fillcolor=gray];
62 [label="Exit block" style="filled" fillcolor=gray];
}
63 [label="Exit function getter" style="filled" fillcolor=red];
} }
56 -> {57};
57 -> {58}; 57 -> {58};
58 -> {59};
59 -> {60};
60 -> {63};
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
62 -> {63} [style=dotted];
subgraph cluster_25 { subgraph cluster_24 {
color=red color=red
64 [label="Enter function fdata" style="filled" fillcolor=red]; 59 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_26 { subgraph cluster_25 {
color=blue color=blue
65 [label="Enter block"]; 60 [label="Enter block"];
66 [label="Const: Null(null)"]; 61 [label="Const: Null(null)"];
67 [label="Jump: ^fdata Null(null)"]; 62 [label="Jump: ^ Null(null)"];
68 [label="Stub" style="filled" fillcolor=gray]; 63 [label="Stub" style="filled" fillcolor=gray];
69 [label="Exit block" style="filled" fillcolor=gray]; 64 [label="Exit block" style="filled" fillcolor=gray];
} }
70 [label="Exit function fdata" style="filled" fillcolor=red]; 65 [label="Exit function getter" style="filled" fillcolor=red];
} }
64 -> {65}; 59 -> {60};
65 -> {66}; 60 -> {61};
66 -> {67}; 61 -> {62};
67 -> {70}; 62 -> {65};
67 -> {68} [style=dotted]; 62 -> {63} [style=dotted];
68 -> {69} [style=dotted]; 63 -> {64} [style=dotted];
69 -> {70} [style=dotted]; 64 -> {65} [style=dotted];
subgraph cluster_27 { subgraph cluster_26 {
color=red color=red
71 [label="Enter class QImplWithCustomGetter" style="filled" fillcolor=red]; 66 [label="Enter function fdata" style="filled" fillcolor=red];
72 [label="Exit class QImplWithCustomGetter" style="filled" fillcolor=red]; subgraph cluster_27 {
color=blue
67 [label="Enter block"];
68 [label="Const: Null(null)"];
69 [label="Jump: ^fdata Null(null)"];
70 [label="Stub" style="filled" fillcolor=gray];
71 [label="Exit block" style="filled" fillcolor=gray];
}
72 [label="Exit function fdata" style="filled" fillcolor=red];
} }
71 -> {72} [color=green]; 66 -> {67};
67 -> {68};
68 -> {69};
69 -> {72};
69 -> {70} [style=dotted];
70 -> {71} [style=dotted];
71 -> {72} [style=dotted];
subgraph cluster_28 { subgraph cluster_28 {
color=red color=red
@@ -5,63 +5,63 @@ digraph implicitReceivers_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class A" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter function foo" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_2 { 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 4 [label="Exit function <init>" style="filled" fillcolor=red];
4 [label="Enter block"];
5 [label="Exit block"];
}
6 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5};
5 -> {6};
subgraph cluster_3 { subgraph cluster_2 {
color=red color=red
7 [label="Enter class A" style="filled" fillcolor=red]; 5 [label="Enter function foo" style="filled" fillcolor=red];
8 [label="Exit class A" style="filled" fillcolor=red]; subgraph cluster_3 {
color=blue
6 [label="Enter block"];
7 [label="Exit block"];
}
8 [label="Exit function foo" style="filled" fillcolor=red];
} }
7 -> {8} [color=green]; 5 -> {6};
6 -> {7};
7 -> {8};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
9 [label="Enter function <init>" style="filled" fillcolor=red]; 9 [label="Enter class B" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 10 [label="Exit class B" style="filled" fillcolor=red];
11 [label="Exit function <init>" style="filled" fillcolor=red];
} }
9 -> {10}; 9 -> {10} [color=green];
10 -> {11};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
12 [label="Enter function bar" style="filled" fillcolor=red]; 11 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_6 { 12 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 13 [label="Exit function <init>" style="filled" fillcolor=red];
13 [label="Enter block"];
14 [label="Exit block"];
}
15 [label="Exit function bar" style="filled" fillcolor=red];
} }
11 -> {12};
12 -> {13}; 12 -> {13};
13 -> {14};
14 -> {15};
subgraph cluster_7 { subgraph cluster_6 {
color=red color=red
16 [label="Enter class B" style="filled" fillcolor=red]; 14 [label="Enter function bar" style="filled" fillcolor=red];
17 [label="Exit class B" style="filled" fillcolor=red]; subgraph cluster_7 {
color=blue
15 [label="Enter block"];
16 [label="Exit block"];
}
17 [label="Exit function bar" style="filled" fillcolor=red];
} }
16 -> {17} [color=green]; 14 -> {15};
15 -> {16};
16 -> {17};
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
@@ -12,17 +12,17 @@ digraph thisOfExtensionProperty_kt {
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function getter" style="filled" fillcolor=red]; 2 [label="Enter class B" style="filled" fillcolor=red];
3 [label="Exit function getter" style="filled" fillcolor=red]; 3 [label="Exit class B" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3} [color=green];
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class B" style="filled" fillcolor=red]; 4 [label="Enter function getter" style="filled" fillcolor=red];
5 [label="Exit class B" style="filled" fillcolor=red]; 5 [label="Exit function getter" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
@@ -5,70 +5,70 @@ digraph assignSafeCall_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_1 {
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
subgraph cluster_1 {
color=red
3 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue color=blue
4 [label="Enter block"]; 2 [label="Enter property" style="filled" fillcolor=red];
5 [label="Const: Int(1)"]; 3 [label="Const: Int(1)"];
6 [label="Jump: ^foo Int(1)"]; 4 [label="Exit property" style="filled" fillcolor=red];
7 [label="Stub" style="filled" fillcolor=gray];
8 [label="Exit block" style="filled" fillcolor=gray];
} }
9 [label="Exit function foo" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red];
} }
0 -> {2} [color=green];
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5}; 4 -> {1} [color=green];
subgraph cluster_2 {
color=red
5 [label="Enter function <init>" style="filled" fillcolor=red];
6 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
7 [label="Exit function <init>" style="filled" fillcolor=red];
}
5 -> {6}; 5 -> {6};
6 -> {9}; 6 -> {7};
6 -> {7} [style=dotted];
7 -> {8} [style=dotted];
8 -> {9} [style=dotted];
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
10 [label="Enter function getter" style="filled" fillcolor=red]; 8 [label="Enter function foo" style="filled" fillcolor=red];
11 [label="Exit function getter" style="filled" fillcolor=red]; subgraph cluster_4 {
}
10 -> {11};
subgraph cluster_4 {
color=red
15 [label="Enter function bar" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue color=blue
16 [label="Enter block"]; 9 [label="Enter block"];
17 [label="Exit block"]; 10 [label="Const: Int(1)"];
11 [label="Jump: ^foo Int(1)"];
12 [label="Stub" style="filled" fillcolor=gray];
13 [label="Exit block" style="filled" fillcolor=gray];
} }
18 [label="Exit function bar" style="filled" fillcolor=red]; 14 [label="Exit function foo" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {14};
11 -> {12} [style=dotted];
12 -> {13} [style=dotted];
13 -> {14} [style=dotted];
subgraph cluster_5 {
color=red
15 [label="Enter function getter" style="filled" fillcolor=red];
16 [label="Exit function getter" style="filled" fillcolor=red];
} }
15 -> {16}; 15 -> {16};
16 -> {17};
17 -> {18};
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
19 [label="Enter class A" style="filled" fillcolor=red]; 17 [label="Enter function bar" style="filled" fillcolor=red];
subgraph cluster_7 { subgraph cluster_7 {
color=blue color=blue
12 [label="Enter property" style="filled" fillcolor=red]; 18 [label="Enter block"];
13 [label="Const: Int(1)"]; 19 [label="Exit block"];
14 [label="Exit property" style="filled" fillcolor=red];
} }
20 [label="Exit class A" style="filled" fillcolor=red]; 20 [label="Exit function bar" style="filled" fillcolor=red];
} }
19 -> {12} [color=green]; 17 -> {18};
12 -> {13}; 18 -> {19};
13 -> {14}; 19 -> {20};
14 -> {20} [color=green];
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
@@ -278,31 +278,31 @@ digraph assignSafeCall_kt {
subgraph cluster_25 { subgraph cluster_25 {
color=red color=red
98 [label="Enter function foo" style="filled" fillcolor=red]; 98 [label="Enter class B" style="filled" fillcolor=red];
99 [label="Exit function foo" style="filled" fillcolor=red]; 99 [label="Exit class B" style="filled" fillcolor=red];
} }
98 -> {99}; 98 -> {99} [color=green];
subgraph cluster_26 { subgraph cluster_26 {
color=red color=red
100 [label="Enter function getter" style="filled" fillcolor=red]; 100 [label="Enter function foo" style="filled" fillcolor=red];
101 [label="Exit function getter" style="filled" fillcolor=red]; 101 [label="Exit function foo" style="filled" fillcolor=red];
} }
100 -> {101}; 100 -> {101};
subgraph cluster_27 { subgraph cluster_27 {
color=red color=red
102 [label="Enter function bar" style="filled" fillcolor=red]; 102 [label="Enter function getter" style="filled" fillcolor=red];
103 [label="Exit function bar" style="filled" fillcolor=red]; 103 [label="Exit function getter" style="filled" fillcolor=red];
} }
102 -> {103}; 102 -> {103};
subgraph cluster_28 { subgraph cluster_28 {
color=red color=red
104 [label="Enter class B" style="filled" fillcolor=red]; 104 [label="Enter function bar" style="filled" fillcolor=red];
105 [label="Exit class B" style="filled" fillcolor=red]; 105 [label="Exit function bar" style="filled" fillcolor=red];
} }
104 -> {105} [color=green]; 104 -> {105};
subgraph cluster_29 { subgraph cluster_29 {
color=red color=red
@@ -74,31 +74,31 @@ digraph safeCalls_kt {
subgraph cluster_6 { subgraph cluster_6 {
color=red color=red
25 [label="Enter function bar" style="filled" fillcolor=red]; 25 [label="Enter class A" style="filled" fillcolor=red];
26 [label="Exit function bar" style="filled" fillcolor=red]; 26 [label="Exit class A" style="filled" fillcolor=red];
} }
25 -> {26}; 25 -> {26} [color=green];
subgraph cluster_7 { subgraph cluster_7 {
color=red color=red
27 [label="Enter function bool" style="filled" fillcolor=red]; 27 [label="Enter function bar" style="filled" fillcolor=red];
28 [label="Exit function bool" style="filled" fillcolor=red]; 28 [label="Exit function bar" style="filled" fillcolor=red];
} }
27 -> {28}; 27 -> {28};
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
29 [label="Enter function id" style="filled" fillcolor=red]; 29 [label="Enter function bool" style="filled" fillcolor=red];
30 [label="Exit function id" style="filled" fillcolor=red]; 30 [label="Exit function bool" style="filled" fillcolor=red];
} }
29 -> {30}; 29 -> {30};
subgraph cluster_9 { subgraph cluster_9 {
color=red color=red
31 [label="Enter class A" style="filled" fillcolor=red]; 31 [label="Enter function id" style="filled" fillcolor=red];
32 [label="Exit class A" style="filled" fillcolor=red]; 32 [label="Exit function id" style="filled" fillcolor=red];
} }
31 -> {32} [color=green]; 31 -> {32};
subgraph cluster_10 { subgraph cluster_10 {
color=red color=red
@@ -12,17 +12,17 @@ digraph smartCastInInit_kt {
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
2 [label="Enter function foo" style="filled" fillcolor=red]; 2 [label="Enter class S" style="filled" fillcolor=red];
3 [label="Exit function foo" style="filled" fillcolor=red]; 3 [label="Exit class S" style="filled" fillcolor=red];
} }
2 -> {3}; 2 -> {3} [color=green];
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
4 [label="Enter class S" style="filled" fillcolor=red]; 4 [label="Enter function foo" style="filled" fillcolor=red];
5 [label="Exit class S" style="filled" fillcolor=red]; 5 [label="Exit function foo" style="filled" fillcolor=red];
} }
4 -> {5} [color=green]; 4 -> {5};
subgraph cluster_3 { subgraph cluster_3 {
color=red color=red
@@ -49,47 +49,47 @@ digraph smartCastInInit_kt {
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
14 [label="Enter function <init>" style="filled" fillcolor=red]; 14 [label="Enter class Main" style="filled" fillcolor=red];
15 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_6 {
16 [label="Exit function <init>" style="filled" fillcolor=red];
}
14 -> {15};
15 -> {16};
subgraph cluster_6 {
color=red
17 [label="Enter function getter" style="filled" fillcolor=red];
18 [label="Exit function getter" style="filled" fillcolor=red];
}
17 -> {18};
subgraph cluster_7 {
color=red
27 [label="Enter class Main" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue color=blue
19 [label="Enter init block" style="filled" fillcolor=red]; 16 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_9 { subgraph cluster_7 {
color=blue color=blue
20 [label="Enter block"]; 17 [label="Enter block"];
21 [label="Function call: R|/s|()"]; 18 [label="Function call: R|/s|()"];
22 [label="Assignment: R|/Main.x|"]; 19 [label="Assignment: R|/Main.x|"];
23 [label="Access variable R|/Main.x|"]; 20 [label="Access variable R|/Main.x|"];
24 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()"]; 21 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()"];
25 [label="Exit block"]; 22 [label="Exit block"];
} }
26 [label="Exit init block" style="filled" fillcolor=red]; 23 [label="Exit init block" style="filled" fillcolor=red];
} }
28 [label="Exit class Main" style="filled" fillcolor=red]; 15 [label="Exit class Main" style="filled" fillcolor=red];
} }
27 -> {19} [color=green]; 14 -> {16} [color=green];
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {21}; 20 -> {21};
21 -> {22}; 21 -> {22};
22 -> {23}; 22 -> {23};
23 -> {24}; 23 -> {15} [color=green];
subgraph cluster_8 {
color=red
24 [label="Enter function <init>" style="filled" fillcolor=red];
25 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
26 [label="Exit function <init>" style="filled" fillcolor=red];
}
24 -> {25}; 24 -> {25};
25 -> {26}; 25 -> {26};
26 -> {28} [color=green];
subgraph cluster_9 {
color=red
27 [label="Enter function getter" style="filled" fillcolor=red];
28 [label="Exit function getter" style="filled" fillcolor=red];
}
27 -> {28};
} }
@@ -116,51 +116,51 @@ digraph smartcastToNothing_kt {
subgraph cluster_10 { subgraph cluster_10 {
color=red color=red
38 [label="Enter function <init>" style="filled" fillcolor=red]; 38 [label="Enter class A" style="filled" fillcolor=red];
39 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_11 {
40 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 40 [label="Enter property" style="filled" fillcolor=red];
38 -> {39}; 41 [label="Const: Int(1)"];
39 -> {40}; 42 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_11 { subgraph cluster_12 {
color=red color=blue
41 [label="Enter function getter" style="filled" fillcolor=red]; 43 [label="Enter property" style="filled" fillcolor=red];
42 [label="Exit function getter" style="filled" fillcolor=red]; 44 [label="Const: Boolean(true)"];
45 [label="Exit property" style="filled" fillcolor=red];
}
39 [label="Exit class A" style="filled" fillcolor=red];
} }
38 -> {40} [color=green];
40 -> {41};
41 -> {42}; 41 -> {42};
42 -> {43} [color=green];
subgraph cluster_12 { 43 -> {44};
color=red 44 -> {45};
46 [label="Enter function getter" style="filled" fillcolor=red]; 45 -> {39} [color=green];
47 [label="Exit function getter" style="filled" fillcolor=red];
}
46 -> {47};
subgraph cluster_13 { subgraph cluster_13 {
color=red color=red
51 [label="Enter class A" style="filled" fillcolor=red]; 46 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_14 { 47 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 48 [label="Exit function <init>" style="filled" fillcolor=red];
43 [label="Enter property" style="filled" fillcolor=red]; }
44 [label="Const: Int(1)"]; 46 -> {47};
45 [label="Exit property" style="filled" fillcolor=red]; 47 -> {48};
}
subgraph cluster_15 { subgraph cluster_14 {
color=blue color=red
48 [label="Enter property" style="filled" fillcolor=red]; 49 [label="Enter function getter" style="filled" fillcolor=red];
49 [label="Const: Boolean(true)"]; 50 [label="Exit function getter" style="filled" fillcolor=red];
50 [label="Exit property" style="filled" fillcolor=red];
}
52 [label="Exit class A" style="filled" fillcolor=red];
} }
51 -> {43} [color=green];
43 -> {44};
44 -> {45};
45 -> {48} [color=green];
48 -> {49};
49 -> {50}; 49 -> {50};
50 -> {52} [color=green];
subgraph cluster_15 {
color=red
51 [label="Enter function getter" style="filled" fillcolor=red];
52 [label="Exit function getter" style="filled" fillcolor=red];
}
51 -> {52};
subgraph cluster_16 { subgraph cluster_16 {
color=red color=red
@@ -5,102 +5,102 @@ digraph overridenOpenVal_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; subgraph cluster_1 {
2 [label="Exit function <init>" style="filled" fillcolor=red]; color=blue
} 2 [label="Enter property" style="filled" fillcolor=red];
0 -> {1}; 3 [label="Access variable R|<local>/x|"];
1 -> {2}; 4 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_1 { 1 [label="Exit class A" style="filled" fillcolor=red];
color=red
3 [label="Enter function getter" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red];
} }
0 -> {2} [color=green];
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {1} [color=green];
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
8 [label="Enter class A" style="filled" fillcolor=red]; 5 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_3 { 6 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 7 [label="Exit function <init>" style="filled" fillcolor=red];
5 [label="Enter property" style="filled" fillcolor=red];
6 [label="Access variable R|<local>/x|"];
7 [label="Exit property" style="filled" fillcolor=red];
}
9 [label="Exit class A" style="filled" fillcolor=red];
} }
8 -> {5} [color=green];
5 -> {6}; 5 -> {6};
6 -> {7}; 6 -> {7};
7 -> {9} [color=green];
subgraph cluster_3 {
color=red
8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function getter" style="filled" fillcolor=red];
}
8 -> {9};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
10 [label="Enter function <init>" style="filled" fillcolor=red]; 10 [label="Enter class B" style="filled" fillcolor=red];
11 [label="Access variable R|<local>/x|"]; 11 [label="Exit class B" style="filled" fillcolor=red];
12 [label="Delegated constructor call: super<R|A|>(...)"];
13 [label="Exit function <init>" style="filled" fillcolor=red];
} }
10 -> {11}; 10 -> {11} [color=green];
11 -> {12};
12 -> {13};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
14 [label="Enter function test_1" style="filled" fillcolor=red]; 12 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_6 { 13 [label="Access variable R|<local>/x|"];
14 [label="Delegated constructor call: super<R|A|>(...)"];
15 [label="Exit function <init>" style="filled" fillcolor=red];
}
12 -> {13};
13 -> {14};
14 -> {15};
subgraph cluster_6 {
color=red
16 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue color=blue
15 [label="Enter block"]; 17 [label="Enter block"];
subgraph cluster_7 { subgraph cluster_8 {
color=blue color=blue
16 [label="Enter when"]; 18 [label="Enter when"];
subgraph cluster_8 {
color=blue
17 [label="Enter when branch condition "];
18 [label="Access variable R|/A.x|"];
19 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
20 [label="Exit when branch condition"];
}
21 [label="Synthetic else branch"];
22 [label="Enter when branch result"];
subgraph cluster_9 { subgraph cluster_9 {
color=blue color=blue
23 [label="Enter block"]; 19 [label="Enter when branch condition "];
24 [label="Access variable R|/A.x|"]; 20 [label="Access variable R|/A.x|"];
25 [label="Access variable R|kotlin/String.length|"]; 21 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
26 [label="Exit block"]; 22 [label="Exit when branch condition"];
} }
27 [label="Exit when branch result"]; 23 [label="Synthetic else branch"];
28 [label="Exit when"]; 24 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
25 [label="Enter block"];
26 [label="Access variable R|/A.x|"];
27 [label="Access variable R|kotlin/String.length|"];
28 [label="Exit block"];
}
29 [label="Exit when branch result"];
30 [label="Exit when"];
} }
29 [label="Exit block"]; 31 [label="Exit block"];
} }
30 [label="Exit function test_1" style="filled" fillcolor=red]; 32 [label="Exit function test_1" style="filled" fillcolor=red];
} }
14 -> {15};
15 -> {16};
16 -> {17}; 16 -> {17};
17 -> {18}; 17 -> {18};
18 -> {19}; 18 -> {19};
19 -> {20}; 19 -> {20};
20 -> {22 21}; 20 -> {21};
21 -> {28}; 21 -> {22};
22 -> {23}; 22 -> {24 23};
23 -> {24}; 23 -> {30};
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 -> {31};
subgraph cluster_10 { 31 -> {32};
color=red
31 [label="Enter class B" style="filled" fillcolor=red];
32 [label="Exit class B" style="filled" fillcolor=red];
}
31 -> {32} [color=green];
subgraph cluster_11 { subgraph cluster_11 {
color=red color=red
@@ -5,33 +5,33 @@ digraph delayedAssignment_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class A" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter function foo" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_2 { 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 4 [label="Exit function <init>" style="filled" fillcolor=red];
4 [label="Enter block"];
5 [label="Exit block"];
}
6 [label="Exit function foo" style="filled" fillcolor=red];
} }
2 -> {3};
3 -> {4}; 3 -> {4};
4 -> {5};
5 -> {6};
subgraph cluster_3 { subgraph cluster_2 {
color=red color=red
7 [label="Enter class A" style="filled" fillcolor=red]; 5 [label="Enter function foo" style="filled" fillcolor=red];
8 [label="Exit class A" style="filled" fillcolor=red]; subgraph cluster_3 {
color=blue
6 [label="Enter block"];
7 [label="Exit block"];
}
8 [label="Exit function foo" style="filled" fillcolor=red];
} }
7 -> {8} [color=green]; 5 -> {6};
6 -> {7};
7 -> {8};
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
@@ -21,7 +21,7 @@ fun test_1() {
inlineRun { inlineRun {
x = 1 x = 1
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun test_2() { fun test_2() {
@@ -29,5 +29,5 @@ fun test_2() {
myRun { myRun {
x = 1 x = 1
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -21,7 +21,7 @@ fun test_1() {
inlineRun { inlineRun {
x = 1 x = 1
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun test_2() { fun test_2() {
@@ -29,5 +29,5 @@ fun test_2() {
myRun { myRun {
x = 1 x = 1
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -5,19 +5,19 @@ digraph delegateWithAnonymousObject_kt {
subgraph cluster_0 { subgraph cluster_0 {
color=red color=red
0 [label="Enter function <init>" style="filled" fillcolor=red]; 0 [label="Enter class DelegateProvider" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"]; 1 [label="Exit class DelegateProvider" style="filled" fillcolor=red];
2 [label="Exit function <init>" style="filled" fillcolor=red];
} }
0 -> {1}; 0 -> {1} [color=green];
1 -> {2};
subgraph cluster_1 { subgraph cluster_1 {
color=red color=red
3 [label="Enter class DelegateProvider" style="filled" fillcolor=red]; 2 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Exit class DelegateProvider" style="filled" fillcolor=red]; 3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
} }
3 -> {4} [color=green]; 2 -> {3};
3 -> {4};
subgraph cluster_2 { subgraph cluster_2 {
color=red color=red
@@ -44,195 +44,195 @@ digraph delegateWithAnonymousObject_kt {
subgraph cluster_4 { subgraph cluster_4 {
color=red color=red
13 [label="Enter function <init>" style="filled" fillcolor=red]; 13 [label="Enter class IssueListView" style="filled" fillcolor=red];
14 [label="Delegated constructor call: super<R|DelegateProvider<IssueListView>|>()"]; 14 [label="Exit class IssueListView" style="filled" fillcolor=red];
15 [label="Exit function <init>" style="filled" fillcolor=red];
} }
13 -> {14}; 13 -> {14} [color=green];
14 -> {15};
subgraph cluster_5 { subgraph cluster_5 {
color=red color=red
16 [label="Enter function updateFrom" style="filled" fillcolor=red]; 15 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_6 { 16 [label="Delegated constructor call: super<R|DelegateProvider<IssueListView>|>()"];
color=blue 17 [label="Exit function <init>" style="filled" fillcolor=red];
17 [label="Enter block"];
18 [label="Exit block"];
}
19 [label="Exit function updateFrom" style="filled" fillcolor=red];
} }
15 -> {16};
16 -> {17}; 16 -> {17};
17 -> {18};
18 -> {19};
subgraph cluster_7 { subgraph cluster_6 {
color=red color=red
20 [label="Enter class IssueListView" style="filled" fillcolor=red]; 18 [label="Enter function updateFrom" style="filled" fillcolor=red];
21 [label="Exit class IssueListView" style="filled" fillcolor=red]; subgraph cluster_7 {
color=blue
19 [label="Enter block"];
20 [label="Exit block"];
}
21 [label="Exit function updateFrom" style="filled" fillcolor=red];
} }
20 -> {21} [color=green]; 18 -> {19};
19 -> {20};
20 -> {21};
subgraph cluster_8 { subgraph cluster_8 {
color=red color=red
22 [label="Enter function <init>" style="filled" fillcolor=red]; 22 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red];
23 [label="Delegated constructor call: super<R|DelegateProvider<IssuesListUserProfile>|>()"]; subgraph cluster_9 {
24 [label="Exit function <init>" style="filled" fillcolor=red];
}
22 -> {23};
23 -> {24};
subgraph cluster_9 {
color=red
32 [label="Enter function <init>" style="filled" fillcolor=red];
33 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
34 [label="Exit function <init>" style="filled" fillcolor=red];
}
32 -> {33};
33 -> {34};
subgraph cluster_10 {
color=red
35 [label="Enter function getValue" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue color=blue
36 [label="Enter block"]; 39 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
37 [label="Function call: R|/IssueListView.IssueListView|()"]; 40 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
38 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"];
39 [label="Stub" style="filled" fillcolor=gray];
40 [label="Exit block" style="filled" fillcolor=gray];
} }
41 [label="Exit function getValue" style="filled" fillcolor=red]; subgraph cluster_10 {
color=blue
24 [label="Enter property" style="filled" fillcolor=red];
25 [label="Postponed enter to lambda"];
26 [label="Postponed exit from lambda"];
27 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
28 [label="Access variable this@R|/IssuesListUserProfile|"];
29 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)"];
30 [label="Postponed enter to lambda"];
subgraph cluster_11 {
color=blue
34 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
35 [label="Enter block"];
36 [label="Exit anonymous object"];
37 [label="Exit block"];
}
38 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
31 [label="Postponed exit from lambda"];
32 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
33 [label="Exit property" style="filled" fillcolor=red];
}
23 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
} }
22 -> {24} [color=green];
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31 34};
31 -> {32};
32 -> {33};
33 -> {23} [color=green];
34 -> {35};
35 -> {36}; 35 -> {36};
35 -> {44 47 54} [color=red];
36 -> {37}; 36 -> {37};
37 -> {38}; 37 -> {38};
38 -> {41}; 39 -> {40} [color=green];
38 -> {39} [style=dotted];
39 -> {40} [style=dotted];
40 -> {41} [style=dotted];
subgraph cluster_12 { subgraph cluster_13 {
color=red color=red
42 [label="Enter function setValue" style="filled" fillcolor=red]; 41 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_13 { 42 [label="Delegated constructor call: super<R|DelegateProvider<IssuesListUserProfile>|>()"];
color=blue 43 [label="Exit function <init>" style="filled" fillcolor=red];
43 [label="Enter block"];
44 [label="Function call: R|/IssueListView.IssueListView|()"];
45 [label="Access variable R|<local>/value|"];
46 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"];
47 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"];
48 [label="Stub" style="filled" fillcolor=gray];
49 [label="Exit block" style="filled" fillcolor=gray];
}
50 [label="Exit function setValue" style="filled" fillcolor=red];
} }
41 -> {42};
42 -> {43}; 42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {50};
47 -> {48} [style=dotted];
48 -> {49} [style=dotted];
49 -> {50} [style=dotted];
subgraph cluster_14 { subgraph cluster_14 {
color=red color=red
51 [label="Enter function getter" style="filled" fillcolor=red]; 44 [label="Enter function <init>" style="filled" fillcolor=red];
subgraph cluster_15 { 45 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
color=blue 46 [label="Exit function <init>" style="filled" fillcolor=red];
52 [label="Enter block"]; }
53 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; 44 -> {45};
54 [label="Access variable this@R|/IssuesListUserProfile|"]; 45 -> {46};
55 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
56 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"]; subgraph cluster_15 {
57 [label="Stub" style="filled" fillcolor=gray]; color=red
58 [label="Exit block" style="filled" fillcolor=gray]; 47 [label="Enter function getValue" style="filled" fillcolor=red];
} subgraph cluster_16 {
59 [label="Exit function getter" style="filled" fillcolor=red]; color=blue
48 [label="Enter block"];
49 [label="Function call: R|/IssueListView.IssueListView|()"];
50 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"];
51 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit block" style="filled" fillcolor=gray];
}
53 [label="Exit function getValue" style="filled" fillcolor=red];
}
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {53};
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
subgraph cluster_17 {
color=red
54 [label="Enter function setValue" style="filled" fillcolor=red];
subgraph cluster_18 {
color=blue
55 [label="Enter block"];
56 [label="Function call: R|/IssueListView.IssueListView|()"];
57 [label="Access variable R|<local>/value|"];
58 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"];
59 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"];
60 [label="Stub" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
}
62 [label="Exit function setValue" style="filled" fillcolor=red];
} }
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55}; 54 -> {55};
55 -> {56}; 55 -> {56};
56 -> {59}; 56 -> {57};
56 -> {57} [style=dotted]; 57 -> {58};
57 -> {58} [style=dotted]; 58 -> {59};
58 -> {59} [style=dotted]; 59 -> {62};
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
subgraph cluster_16 { subgraph cluster_19 {
color=red color=red
60 [label="Enter function setter" style="filled" fillcolor=red]; 63 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_17 { subgraph cluster_20 {
color=blue color=blue
61 [label="Enter block"]; 64 [label="Enter block"];
62 [label="Access variable D|/IssuesListUserProfile.issueListView|"]; 65 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
63 [label="Access variable this@R|/IssuesListUserProfile|"]; 66 [label="Access variable this@R|/IssuesListUserProfile|"];
64 [label="Access variable R|<local>/issueListView|"]; 67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
65 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(...)"]; 68 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
66 [label="Exit block"]; 69 [label="Stub" style="filled" fillcolor=gray];
70 [label="Exit block" style="filled" fillcolor=gray];
} }
67 [label="Exit function setter" style="filled" fillcolor=red]; 71 [label="Exit function getter" style="filled" fillcolor=red];
} }
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64}; 63 -> {64};
64 -> {65}; 64 -> {65};
65 -> {66}; 65 -> {66};
66 -> {67}; 66 -> {67};
67 -> {68};
68 -> {71};
68 -> {69} [style=dotted];
69 -> {70} [style=dotted];
70 -> {71} [style=dotted];
subgraph cluster_18 { subgraph cluster_21 {
color=red color=red
78 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red]; 72 [label="Enter function setter" style="filled" fillcolor=red];
subgraph cluster_19 { subgraph cluster_22 {
color=blue color=blue
30 [label="Enter class <anonymous object>" style="filled" fillcolor=red]; 73 [label="Enter block"];
31 [label="Exit class <anonymous object>" style="filled" fillcolor=red]; 74 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
75 [label="Access variable this@R|/IssuesListUserProfile|"];
76 [label="Access variable R|<local>/issueListView|"];
77 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|FakeOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(...)"];
78 [label="Exit block"];
} }
subgraph cluster_20 { 79 [label="Exit function setter" style="filled" fillcolor=red];
color=blue
68 [label="Enter property" style="filled" fillcolor=red];
69 [label="Postponed enter to lambda"];
70 [label="Postponed exit from lambda"];
71 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
72 [label="Access variable this@R|/IssuesListUserProfile|"];
73 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)"];
74 [label="Postponed enter to lambda"];
subgraph cluster_21 {
color=blue
25 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_22 {
color=blue
26 [label="Enter block"];
27 [label="Exit anonymous object"];
28 [label="Exit block"];
}
29 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
75 [label="Postponed exit from lambda"];
76 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
77 [label="Exit property" style="filled" fillcolor=red];
}
79 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
} }
78 -> {68} [color=green];
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73}; 72 -> {73};
73 -> {74}; 73 -> {74};
74 -> {75 25}; 74 -> {75};
75 -> {76}; 75 -> {76};
76 -> {77}; 76 -> {77};
77 -> {79} [color=green]; 77 -> {78};
25 -> {26}; 78 -> {79};
26 -> {27};
26 -> {32 35 42} [color=red];
27 -> {28};
28 -> {29};
30 -> {31} [color=green];
} }
@@ -13,6 +13,8 @@ import org.jetbrains.kotlin.fir.declarations.FirProperty
import org.jetbrains.kotlin.fir.resolve.dfa.cfg.ControlFlowGraph import org.jetbrains.kotlin.fir.resolve.dfa.cfg.ControlFlowGraph
class FirControlFlowAnalyzer { class FirControlFlowAnalyzer {
private val propertyInitializationAnalyzer = FirPropertyInitializationAnalyzer()
fun analyzeClassInitializer(klass: FirClass<*>, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) { fun analyzeClassInitializer(klass: FirClass<*>, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) {
if (graph.owner != null) return if (graph.owner != null) return
// TODO() // TODO()
@@ -20,11 +22,11 @@ class FirControlFlowAnalyzer {
fun analyzeFunction(function: FirFunction<*>, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) { fun analyzeFunction(function: FirFunction<*>, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) {
if (graph.owner != null) return if (graph.owner != null) return
// TODO() propertyInitializationAnalyzer.analyze(graph, reporter)
} }
fun analyzePropertyInitializer(property: FirProperty, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) { fun analyzePropertyInitializer(property: FirProperty, graph: ControlFlowGraph, context: CheckerContext, reporter: DiagnosticReporter) {
if (graph.owner != null) return if (graph.owner != null) return
// TODO() // TODO()
} }
} }
@@ -0,0 +1,129 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.analysis.cfa
import kotlinx.collections.immutable.PersistentMap
import kotlinx.collections.immutable.persistentMapOf
import org.jetbrains.kotlin.contracts.description.InvocationKind
import org.jetbrains.kotlin.contracts.description.isDefinitelyVisited
import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors
import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
import org.jetbrains.kotlin.fir.resolve.dfa.cfg.*
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
class FirPropertyInitializationAnalyzer {
fun analyze(graph: ControlFlowGraph, reporter: DiagnosticReporter) {
val localProperties = LocalPropertyCollector.collect(graph)
// we want to analyze only properties without initializers
localProperties.retainAll { it.fir.initializer == null && it.fir.delegate == null }
if (localProperties.isEmpty()) return
val data = graph.collectDataForNode(TraverseDirection.Forward, PropertyInitializationInfo.EMPTY, DataCollector(localProperties))
val reporterVisitor = UninitializedPropertyReporter(data, localProperties, reporter)
graph.traverse(TraverseDirection.Forward, reporterVisitor)
}
private class UninitializedPropertyReporter(
val data: Map<CFGNode<*>, PropertyInitializationInfo>,
val localProperties: Set<FirPropertySymbol>,
val reporter: DiagnosticReporter
) : ControlFlowGraphVisitorVoid() {
override fun visitNode(node: CFGNode<*>) {}
override fun visitQualifiedAccessNode(node: QualifiedAccessNode) {
val reference = node.fir.calleeReference as? FirResolvedNamedReference ?: return
val symbol = reference.resolvedSymbol as? FirPropertySymbol ?: return
if (symbol !in localProperties) return
val kind = data.getValue(node)[symbol] ?: InvocationKind.ZERO
if (!kind.isDefinitelyVisited()) {
node.fir.source?.let {
reporter.report(FirErrors.UNINITIALIZED_VARIABLE.on(it, symbol))
}
}
}
}
private class PropertyInitializationInfo(
map: PersistentMap<FirPropertySymbol, InvocationKind> = persistentMapOf()
) : ControlFlowInfo<PropertyInitializationInfo, FirPropertySymbol, InvocationKind>(map) {
companion object {
val EMPTY = PropertyInitializationInfo()
}
override val constructor: (PersistentMap<FirPropertySymbol, InvocationKind>) -> PropertyInitializationInfo =
::PropertyInitializationInfo
fun merge(other: PropertyInitializationInfo): PropertyInitializationInfo {
var result = this
for (symbol in keys.union(other.keys)) {
val kind1 = this[symbol] ?: InvocationKind.ZERO
val kind2 = other[symbol] ?: InvocationKind.ZERO
result = result.put(symbol, kind1 or kind2)
}
return result
}
}
private class LocalPropertyCollector private constructor() : ControlFlowGraphVisitorVoid() {
companion object {
fun collect(graph: ControlFlowGraph): MutableSet<FirPropertySymbol> {
val collector = LocalPropertyCollector()
graph.traverse(TraverseDirection.Forward, collector)
return collector.symbols
}
}
private val symbols: MutableSet<FirPropertySymbol> = mutableSetOf()
override fun visitNode(node: CFGNode<*>) {}
override fun visitVariableDeclarationNode(node: VariableDeclarationNode) {
symbols += node.fir.symbol
}
}
private class DataCollector(private val localProperties: Set<FirPropertySymbol>) : ControlFlowGraphVisitor<PropertyInitializationInfo, Collection<PropertyInitializationInfo>>() {
override fun visitNode(node: CFGNode<*>, data: Collection<PropertyInitializationInfo>): PropertyInitializationInfo {
if (data.isEmpty()) return PropertyInitializationInfo.EMPTY
return data.reduce(PropertyInitializationInfo::merge)
}
override fun visitVariableAssignmentNode(
node: VariableAssignmentNode,
data: Collection<PropertyInitializationInfo>
): PropertyInitializationInfo {
val dataForNode = visitNode(node, data)
val reference = node.fir.lValue as? FirResolvedNamedReference ?: return dataForNode
val symbol = reference.resolvedSymbol as? FirPropertySymbol ?: return dataForNode
return if (symbol !in localProperties) {
dataForNode
} else{
processVariableWithAssignment(dataForNode, symbol)
}
}
override fun visitVariableDeclarationNode(
node: VariableDeclarationNode,
data: Collection<PropertyInitializationInfo>
): PropertyInitializationInfo {
val dataForNode = visitNode(node, data)
return if (node.fir.initializer == null && node.fir.delegate == null) {
dataForNode
} else {
processVariableWithAssignment(dataForNode, node.fir.symbol)
}
}
private fun processVariableWithAssignment(
dataForNode: PropertyInitializationInfo,
symbol: FirPropertySymbol
): PropertyInitializationInfo {
val existingKind = dataForNode[symbol] ?: InvocationKind.ZERO
val kind = existingKind and InvocationKind.EXACTLY_ONCE
return dataForNode.put(symbol, kind)
}
}
}
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.analysis.diagnostics
import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages
import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.NULLABLE_STRING import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.NULLABLE_STRING
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.PROPERTY_NAME
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOLS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.SYMBOLS
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.TO_STRING import org.jetbrains.kotlin.fir.analysis.diagnostics.FirDiagnosticRenderers.TO_STRING
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.AMBIGUITY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.AMBIGUITY
@@ -16,6 +17,11 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.DEPRECATED_MODIFI
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.DESERIALIZATION_ERROR import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.DESERIALIZATION_ERROR
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ENUM_AS_SUPERTYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ENUM_AS_SUPERTYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ERROR_FROM_JAVA_RESOLUTION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ERROR_FROM_JAVA_RESOLUTION
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_FUNCTION_RETURN_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PARAMETER_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PROPERTY_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_RECEIVER_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.ILLEGAL_CONST_EXPRESSION
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_CANDIDATE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INAPPLICABLE_CANDIDATE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INCOMPATIBLE_MODIFIERS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.INCOMPATIBLE_MODIFIERS
@@ -28,13 +34,9 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.REPEATED_MODIFIER
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.SUPER_IS_NOT_AN_EXPRESSION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.SUPER_IS_NOT_AN_EXPRESSION
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.SYNTAX_ERROR import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.SYNTAX_ERROR
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETER_AS_SUPERTYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.TYPE_PARAMETER_AS_SUPERTYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNINITIALIZED_VARIABLE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_LABEL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_LABEL
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_REFERENCE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.UNRESOLVED_REFERENCE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_TYPEALIAS_EXPANDED_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_FUNCTION_RETURN_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PROPERTY_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_RECEIVER_TYPE
import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PARAMETER_TYPE
@Suppress("unused") @Suppress("unused")
class FirDefaultErrorMessages : DefaultErrorMessages.Extension { class FirDefaultErrorMessages : DefaultErrorMessages.Extension {
@@ -71,6 +73,9 @@ class FirDefaultErrorMessages : DefaultErrorMessages.Extension {
map.put(EXPOSED_FUNCTION_RETURN_TYPE, "{0} function exposes its {2} return type{1}", TO_STRING, TO_STRING, TO_STRING) map.put(EXPOSED_FUNCTION_RETURN_TYPE, "{0} function exposes its {2} return type{1}", TO_STRING, TO_STRING, TO_STRING)
map.put(EXPOSED_RECEIVER_TYPE, "{0} member exposes its {2} receiver type{1}", TO_STRING, TO_STRING, TO_STRING) map.put(EXPOSED_RECEIVER_TYPE, "{0} member exposes its {2} receiver type{1}", TO_STRING, TO_STRING, TO_STRING)
map.put(EXPOSED_PARAMETER_TYPE, "{0} function exposes its {2} parameter type{1}", TO_STRING, TO_STRING, TO_STRING) map.put(EXPOSED_PARAMETER_TYPE, "{0} function exposes its {2} parameter type{1}", TO_STRING, TO_STRING, TO_STRING)
// Control flow diagnostics
map.put(UNINITIALIZED_VARIABLE, "{2} must be initialized before access", PROPERTY_NAME)
} }
} }
} }
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.diagnostics.rendering.Renderer
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
object FirDiagnosticRenderers { object FirDiagnosticRenderers {
val NULLABLE_STRING = Renderer<String?> { it ?: "null" } val NULLABLE_STRING = Renderer<String?> { it ?: "null" }
@@ -26,4 +27,8 @@ object FirDiagnosticRenderers {
val TO_STRING = Renderer { element: Any -> val TO_STRING = Renderer { element: Any ->
element.toString() element.toString()
} }
val PROPERTY_NAME = Renderer { symbol: FirPropertySymbol ->
symbol.fir.name.asString()
}
} }
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.fir.DeclarationWithRelation
import org.jetbrains.kotlin.fir.FirEffectiveVisibility import org.jetbrains.kotlin.fir.FirEffectiveVisibility
import org.jetbrains.kotlin.fir.FirSourceElement import org.jetbrains.kotlin.fir.FirSourceElement
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
import org.jetbrains.kotlin.fir.types.ConeKotlinType import org.jetbrains.kotlin.fir.types.ConeKotlinType
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.*
@@ -75,6 +76,9 @@ object FirErrors {
val REDUNDANT_MODIFIER by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>() val REDUNDANT_MODIFIER by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
val DEPRECATED_MODIFIER_PAIR by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>() val DEPRECATED_MODIFIER_PAIR by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
val INCOMPATIBLE_MODIFIERS by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>() val INCOMPATIBLE_MODIFIERS by error2<FirSourceElement, PsiElement, KtModifierKeywordToken, KtModifierKeywordToken>()
// Control flow diagnostics
val UNINITIALIZED_VARIABLE by error1<FirSourceElement, PsiElement, FirPropertySymbol>()
} }
@@ -9,13 +9,13 @@ fun doSmth(i: Int) {}
fun t1(b : Boolean) { fun t1(b : Boolean) {
val v : Int val v : Int
if (v == 0) {} if (<!UNINITIALIZED_VARIABLE!>v<!> == 0) {}
var u: String var u: String
if (b) { if (b) {
u = "s" u = "s"
} }
doSmth(u) doSmth(<!UNINITIALIZED_VARIABLE!>u<!>)
var r: String var r: String
if (b) { if (b) {
@@ -28,10 +28,10 @@ fun t1(b : Boolean) {
var t: String var t: String
if (b) if (b)
doSmth(t) doSmth(<!UNINITIALIZED_VARIABLE!>t<!>)
else else
t = "ss" t = "ss"
doSmth(t) //repeat for t doSmth(<!UNINITIALIZED_VARIABLE!>t<!>) //repeat for t
val i = 3 val i = 3
doSmth(i) doSmth(i)
@@ -207,7 +207,7 @@ class LocalValsVsProperties(val a: Int, w: Int) : Open(a, w) {
val r : Int val r : Int
doSmth(x) doSmth(x)
doSmth(y) doSmth(y)
doSmth(r) doSmth(<!UNINITIALIZED_VARIABLE!>r<!>)
doSmth(a) doSmth(a)
} }
var xx = w var xx = w
@@ -257,7 +257,7 @@ class ClassObject() {
fun foo() { fun foo() {
val a : Int val a : Int
doSmth(a) doSmth(<!UNINITIALIZED_VARIABLE!>a<!>)
} }
} }
} }
@@ -317,7 +317,7 @@ object TestObjectDeclaration {
if (1 < 3) { if (1 < 3) {
i = 10 i = 10
} }
doSmth(i) doSmth(<!UNINITIALIZED_VARIABLE!>i<!>)
} }
} }
@@ -12,7 +12,7 @@ val a: Int
return d return d
} }
return b return <!UNINITIALIZED_VARIABLE!>b<!>
} }
class A { class A {
@@ -21,7 +21,7 @@ class A {
val b: Int val b: Int
val c: Int val c: Int
42 42
return b return <!UNINITIALIZED_VARIABLE!>b<!>
} }
fun foo() { fun foo() {
@@ -31,7 +31,7 @@ class A {
val b: Int val b: Int
val c: Int val c: Int
42 42
return b return <!UNINITIALIZED_VARIABLE!>b<!>
} }
} }
} }
@@ -11,7 +11,7 @@ fun foo() {
x = 42 x = 42
} }
// Error! // Error!
x.hashCode() <!UNINITIALIZED_VARIABLE!>x<!>.hashCode()
} }
fun bar() { fun bar() {
@@ -8,7 +8,7 @@ fun foo() {
} }
} }
// Error! See KT-10042 // Error! See KT-10042
x.length <!UNINITIALIZED_VARIABLE!>x<!>.length
} }
fun bar() { fun bar() {
@@ -19,7 +19,7 @@ fun bar() {
} }
} }
// Ok // Ok
x.length <!UNINITIALIZED_VARIABLE!>x<!>.length
} }
fun gav() { fun gav() {
@@ -31,7 +31,7 @@ fun gav() {
} }
} }
// Error! See KT-10042 // Error! See KT-10042
x.length <!UNINITIALIZED_VARIABLE!>x<!>.length
val y: String val y: String
class C(val s: String) { class C(val s: String) {
constructor(): this("") { constructor(): this("") {
@@ -39,7 +39,7 @@ fun gav() {
y = s y = s
} }
} }
y.length <!UNINITIALIZED_VARIABLE!>y<!>.length
} }
open class Gau(val s: String) open class Gau(val s: String)
@@ -53,7 +53,7 @@ fun gau() {
} }
} }
// Ok // Ok
x.length <!UNINITIALIZED_VARIABLE!>x<!>.length
val y: String val y: String
fun local() { fun local() {
object: Any() { object: Any() {
@@ -1,8 +0,0 @@
fun foo() {
var x: Int
fun bar() {
x = 42
}
x.hashCode()
bar()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun foo() { fun foo() {
var x: Int var x: Int
fun bar() { fun bar() {
@@ -1,13 +0,0 @@
//KT-2369 Variable is not marked as uninitialized in 'finally' section
fun main() {
var x : Int
try {
throw Exception()
}
finally {
doSmth(x + 1)
}
}
fun doSmth(a: Any?) = a
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
//KT-2369 Variable is not marked as uninitialized in 'finally' section //KT-2369 Variable is not marked as uninitialized in 'finally' section
fun main() { fun main() {
@@ -12,7 +12,7 @@ private fun doTest() : Int {
return 0 ; return 0 ;
} }
finally { finally {
if(list != null) { // Must be an ERROR if(<!UNINITIALIZED_VARIABLE!>list<!> != null) { // Must be an ERROR
} }
} }
} }
@@ -15,7 +15,7 @@ val o = object {
p.x = 4 p.x = 4
val z : Int val z : Int
doSmth(z) doSmth(<!UNINITIALIZED_VARIABLE!>z<!>)
} }
} }
@@ -28,7 +28,7 @@ class A {
val a : Int = 1 val a : Int = 1
get() { get() {
val x : Int val x : Int
doSmth(x) doSmth(<!UNINITIALIZED_VARIABLE!>x<!>)
return field return field
} }
} }
@@ -15,7 +15,7 @@ fun f1(flag: Boolean) {
// KT-13612: reassignment // KT-13612: reassignment
n = 3 n = 3
} }
n.hashCode() <!UNINITIALIZED_VARIABLE!>n<!>.hashCode()
} }
fun f2(flag: Boolean) { fun f2(flag: Boolean) {
@@ -32,7 +32,7 @@ fun f2(flag: Boolean) {
// KT-13612: reassignment // KT-13612: reassignment
n = 3 n = 3
} }
n.hashCode() <!UNINITIALIZED_VARIABLE!>n<!>.hashCode()
} }
} }
@@ -50,6 +50,6 @@ fun f3(flag: Boolean) {
// KT-13612: reassignment // KT-13612: reassignment
n = 3 n = 3
} }
n.hashCode() <!UNINITIALIZED_VARIABLE!>n<!>.hashCode()
} }
} }
@@ -10,6 +10,6 @@ class C {
fun foo() { fun foo() {
val a : Int val a : Int
a + 1 <!UNINITIALIZED_VARIABLE!>a<!> + 1
a + 1 <!UNINITIALIZED_VARIABLE!>a<!> + 1
} }
@@ -23,14 +23,14 @@ fun test2() {
fun test3() { fun test3() {
val f = { val f = {
val a : Int val a : Int
doSmth(a) doSmth(<!UNINITIALIZED_VARIABLE!>a<!>)
} }
} }
fun test4() { fun test4() {
doSmth { doSmth {
val a : Int val a : Int
doSmth(a) doSmth(<!UNINITIALIZED_VARIABLE!>a<!>)
} }
} }
@@ -1,6 +0,0 @@
fun bar(f: () -> Unit) = f()
fun foo() {
var v: Any
bar { v.hashCode() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
fun bar(f: () -> Unit) = f() fun bar(f: () -> Unit) = f()
fun foo() { fun foo() {
+1 -1
View File
@@ -1,7 +1,7 @@
//FILE: foo.kt //FILE: foo.kt
fun main() { fun main() {
val c: Type val c: Type
when (c) { when (<!UNINITIALIZED_VARIABLE!>c<!>) {
} }
} }
@@ -0,0 +1,24 @@
// !LANGUAGE: +LateinitLocalVariables
fun test1() {
lateinit var s: String
<!UNINITIALIZED_VARIABLE!>s<!>.length
}
fun test2() {
lateinit var s: String
run {
s = ""
}
s.length
}
fun almostAlwaysTrue(): Boolean = true
fun test3() {
lateinit var s: String
if (almostAlwaysTrue()) {
s = ""
}
<!UNINITIALIZED_VARIABLE!>s<!>.length
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// !LANGUAGE: +LateinitLocalVariables // !LANGUAGE: +LateinitLocalVariables
fun test1() { fun test1() {
@@ -5,5 +5,5 @@ fun foo(k: Int): Int {
for (j in 1..k) { for (j in 1..k) {
i = j i = j
} }
return i return <!UNINITIALIZED_VARIABLE!>i<!>
} }
@@ -4,7 +4,7 @@ package kt455
fun foo() { fun foo() {
val a: Int val a: Int
doSmth(a) //error doSmth(<!UNINITIALIZED_VARIABLE!>a<!>) //error
doSmth(a) //no repeat error doSmth(<!UNINITIALIZED_VARIABLE!>a<!>) //no repeat error
} }
fun doSmth(i: Int) {} fun doSmth(i: Int) {}
@@ -4,7 +4,7 @@ public fun foo(x: String?): Int {
y = if (x == null) break else x y = if (x == null) break else x
} }
// In future we can infer this initialization // In future we can infer this initialization
y.hashCode() <!UNINITIALIZED_VARIABLE!>y<!>.hashCode()
// x is null because of the break // x is null because of the break
return x.<!INAPPLICABLE_CANDIDATE!>length<!> return x.<!INAPPLICABLE_CANDIDATE!>length<!>
} }
@@ -18,5 +18,5 @@ fun bar(a: Boolean, b: Boolean): Int {
when (b) { when (b) {
false -> x = 3 false -> x = 3
} }
return x return <!UNINITIALIZED_VARIABLE!>x<!>
} }
@@ -18,5 +18,5 @@ fun bar(a: Boolean, b: Boolean): Int {
when (b) { when (b) {
false -> x = 3 false -> x = 3
} }
return x return <!UNINITIALIZED_VARIABLE!>x<!>
} }
@@ -12,7 +12,7 @@ fun testSimpleValInWhenSubject() {
fun testValWithoutInitializerWhenSubject() { fun testValWithoutInitializerWhenSubject() {
when (val y: Any) { when (val y: Any) {
is String -> y.<!UNRESOLVED_REFERENCE!>length<!> is String -> <!UNINITIALIZED_VARIABLE!>y<!>.<!UNRESOLVED_REFERENCE!>length<!>
} }
} }
@@ -44,7 +44,7 @@ fun threeLevelsReturnNoInitialization(x: Int?): Int? {
// Possible to report unreachable here // Possible to report unreachable here
y = 54 y = 54
} }
return y.inc() return <!UNINITIALIZED_VARIABLE!>y<!>.inc()
} }
fun threeLevelsReturnWithInitialization(x: Int?): Int? { fun threeLevelsReturnWithInitialization(x: Int?): Int? {
@@ -82,5 +82,5 @@ fun threeLevelsReturnWithUnknown(x: Int?): Int? {
} }
} }
} }
return y.inc() return <!UNINITIALIZED_VARIABLE!>y<!>.inc()
} }
@@ -36,7 +36,7 @@ fun outerFinallyInitializes() {
x = outerComputation() x = outerComputation()
} catch (e: java.lang.Exception) { } catch (e: java.lang.Exception) {
// can catch exception thrown by the inner, so x can be not initialized // can catch exception thrown by the inner, so x can be not initialized
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
log() log()
} finally { } finally {
// Possible reassignment (e.g. if everything finished) // Possible reassignment (e.g. if everything finished)
@@ -37,7 +37,7 @@ fun innerTryCatchInitializes() {
// Can get here if innerComputation() threw an exception that wasn't catched by the inner catch (x is not initialized) // Can get here if innerComputation() threw an exception that wasn't catched by the inner catch (x is not initialized)
// OR if outerComputation() threw an exception (x is initialized because we reach outer computation only when inner finished ok) // OR if outerComputation() threw an exception (x is initialized because we reach outer computation only when inner finished ok)
// So, x=I? here // So, x=I? here
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
// Potential reasignment // Potential reasignment
x = 42 x = 42
@@ -21,7 +21,7 @@ fun withLabeledReturn() {
y = 42 y = 42
} }
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
println(x) println(x)
} }
@@ -33,7 +33,7 @@ fun exitOnlyThroughLocalReturns(b: Boolean) {
} }
x.inc() x.inc()
s.length <!UNINITIALIZED_VARIABLE!>s<!>.length
} }
fun exitOnlyThroughNonLocalReturns(b: Boolean?) { fun exitOnlyThroughNonLocalReturns(b: Boolean?) {
@@ -49,7 +49,7 @@ fun exitOnlyThroughNonLocalReturns(b: Boolean?) {
x = 54 x = 54
} }
if (x == 42) { if (<!UNINITIALIZED_VARIABLE!>x<!> == 42) {
return return
} }
else { else {
@@ -59,8 +59,8 @@ fun exitOnlyThroughNonLocalReturns(b: Boolean?) {
} }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
s.length <!UNINITIALIZED_VARIABLE!>s<!>.length
} }
fun nonLocalReturnAndOrdinaryExit(b: Boolean) { fun nonLocalReturnAndOrdinaryExit(b: Boolean) {
@@ -44,5 +44,5 @@ fun catchThrowIfNotCalled() {
} catch (ignored: java.lang.IllegalArgumentException) { } } catch (ignored: java.lang.IllegalArgumentException) { }
// x *isn't* initialized here! // x *isn't* initialized here!
println(x) println(<!UNINITIALIZED_VARIABLE!>x<!>)
} }
@@ -22,7 +22,7 @@ fun tryCatchInlined() {
x.inc() x.inc()
} }
catch (e: java.lang.Exception) { catch (e: java.lang.Exception) {
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
} }
x = 42 x = 42
@@ -21,7 +21,7 @@ fun <T> runOnce(block: () -> T): T {
fun valueReassignment() { fun valueReassignment() {
val x: Int val x: Int
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
runTwice { x = 42 } runTwice { x = 42 }
x.inc() x.inc()
} }
@@ -29,12 +29,12 @@ fun valueReassignment() {
fun shadowing() { fun shadowing() {
val x: Int val x: Int
runTwice { val x: Int; x = 42; x.inc() } runTwice { val x: Int; x = 42; x.inc() }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun branchingFlow(a: Any?) { fun branchingFlow(a: Any?) {
val x: Int val x: Int
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
if (a is String) { if (a is String) {
runTwice { x = 42 } runTwice { x = 42 }
} }
@@ -50,18 +50,18 @@ fun branchingFlowWithMissingBranches(a: Any?) {
runTwice { x = 42 } runTwice { x = 42 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun repeatingFlow(n: Int) { fun repeatingFlow(n: Int) {
val x: Int val x: Int
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
for (i in 1..n) { for (i in 1..n) {
runTwice { x = 42 } runTwice { x = 42 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun repeatingFlow2(n: Int) { fun repeatingFlow2(n: Int) {
@@ -71,5 +71,5 @@ fun repeatingFlow2(n: Int) {
runTwice { x = 42 } runTwice { x = 42 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -1,31 +0,0 @@
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
import kotlin.contracts.*
fun <T> runTwice(block: () -> T): T {
contract {
callsInPlace(block, InvocationKind.AT_LEAST_ONCE)
}
block()
return block();
};
fun testInitialization() {
var x: Int
x.inc()
runTwice { x = 42 }
x.inc()
x = 43
x.inc()
}
fun repeatingFlow(n: Int) {
var x: Int
for (i in 1..n) {
runTwice { x = 42 }
}
x.inc()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect // !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER // !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
@@ -19,11 +19,11 @@ fun indefiniteFlow() {
funWithUnknownInvocations { runTwice { x = 42 } } funWithUnknownInvocations { runTwice { x = 42 } }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun shadowing() { fun shadowing() {
var x: Int var x: Int
runTwice { val x: Int; x = 42; x.inc() } runTwice { val x: Int; x = 42; x.inc() }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -31,14 +31,14 @@ fun branchingIndetermineFlow(a: Any?) {
myRun { x = 43 } myRun { x = 43 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun nonAnonymousLambdas() { fun nonAnonymousLambdas() {
val x: Int val x: Int
val initializer = { x = 42 } val initializer = { x = 42 }
myRun(initializer) myRun(initializer)
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun multipleAssignments() { fun multipleAssignments() {
@@ -47,7 +47,7 @@ fun multipleAssignments() {
// Val reassignment because we know that repeat's lambda called in-place // Val reassignment because we know that repeat's lambda called in-place
myRun { x = 42 } myRun { x = 42 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun funWithUnknownInvocations(block: () -> Unit) = block() fun funWithUnknownInvocations(block: () -> Unit) = block()
@@ -56,7 +56,7 @@ fun nestedIndefiniteAssignment() {
val x: Int val x: Int
// Captured val initialization reported, because we don't know anything about funWithUnknownInvocations // Captured val initialization reported, because we don't know anything about funWithUnknownInvocations
funWithUnknownInvocations { myRun { x = 42 } } funWithUnknownInvocations { myRun { x = 42 } }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
class InitializationForbiddenInNonInitSection { class InitializationForbiddenInNonInitSection {
@@ -16,7 +16,7 @@ fun indefiniteVarReassignment(n: Int) {
repeat(n) { repeat(n) {
myRun { x = 42 } myRun { x = 42 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun nonAnonymousLambdas() { fun nonAnonymousLambdas() {
@@ -24,7 +24,7 @@ fun nonAnonymousLambdas() {
var x: Int var x: Int
val initializer = { x = 42 } val initializer = { x = 42 }
myRun(initializer) myRun(initializer)
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun branchingIndetermineFlow(a: Any) { fun branchingIndetermineFlow(a: Any) {
@@ -39,7 +39,7 @@ fun branchingIndetermineFlow(a: Any) {
myRun { x = 43 } myRun { x = 43 }
} }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
fun funWithUnknownInvocations(block: () -> Unit) = block() fun funWithUnknownInvocations(block: () -> Unit) = block()
@@ -47,5 +47,5 @@ fun funWithUnknownInvocations(block: () -> Unit) = block()
fun nestedIndefiniteAssignment() { fun nestedIndefiniteAssignment() {
val x: Int val x: Int
funWithUnknownInvocations { myRun { x = 42 } } funWithUnknownInvocations { myRun { x = 42 } }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -1,28 +0,0 @@
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
import kotlin.contracts.*
fun <T, R> T.myLet(block: (T) -> R): R {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
return block(this)
}
fun initializationWithReceiver(y: String) {
val x: Int
y.myLet { x = 42 }
x.inc()
}
fun initializationWithSafeCall(y: String?) {
val x: Int
y?.myLet { x = 42 }
x.inc()
}
fun sanityCheck(x: Int, y: String): Int {
y.let { return x }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect // !LANGUAGE: +AllowContractsForCustomFunctions +UseCallsInPlaceEffect
// !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts // !USE_EXPERIMENTAL: kotlin.contracts.ExperimentalContracts
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER // !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
@@ -14,5 +14,5 @@ fun <T> inPlace(block: () -> T): T {
fun reassignmentAndNoInitializaiton() { fun reassignmentAndNoInitializaiton() {
val x: Int val x: Int
inPlace { x = 42 } inPlace { x = 42 }
x.inc() <!UNINITIALIZED_VARIABLE!>x<!>.inc()
} }
@@ -88,7 +88,7 @@ fun testRepeatOnVal(x: Int) {
// reassignment instead of captured val initialization // reassignment instead of captured val initialization
y = 42 y = 42
} }
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
} }
fun testRepeatOnVar(x: Int) { fun testRepeatOnVar(x: Int) {
@@ -98,7 +98,7 @@ fun testRepeatOnVar(x: Int) {
y = 42 y = 42
} }
// but here we still unsure if 'y' was initialized // but here we still unsure if 'y' was initialized
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
} }
fun testRepeatOnInitializedVar(x: Int) { fun testRepeatOnInitializedVar(x: Int) {
@@ -34,14 +34,14 @@ fun inPresenceOfLazy(x: Any?, unknownBoolean: Boolean) {
val y: Int val y: Int
if (unknownBoolean && callsAndInverts(x !is String) { y = 42 }) { if (unknownBoolean && callsAndInverts(x !is String) { y = 42 }) {
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
x.length x.length
} }
else { else {
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
x.<!UNRESOLVED_REFERENCE!>length<!> x.<!UNRESOLVED_REFERENCE!>length<!>
} }
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
} }
fun isPresenceOfLazy2(x: Any?, unknownBoolean: Boolean) { fun isPresenceOfLazy2(x: Any?, unknownBoolean: Boolean) {
@@ -50,10 +50,10 @@ fun isPresenceOfLazy2(x: Any?, unknownBoolean: Boolean) {
x.length x.length
} }
else { else {
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
x.<!UNRESOLVED_REFERENCE!>length<!> x.<!UNRESOLVED_REFERENCE!>length<!>
} }
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
} }
fun isPresenceOfLazy3(x: Any?, unknownBoolean: Boolean) { fun isPresenceOfLazy3(x: Any?, unknownBoolean: Boolean) {
@@ -64,5 +64,5 @@ fun isPresenceOfLazy3(x: Any?, unknownBoolean: Boolean) {
else { else {
x.<!UNRESOLVED_REFERENCE!>length<!> x.<!UNRESOLVED_REFERENCE!>length<!>
} }
println(y) println(<!UNINITIALIZED_VARIABLE!>y<!>)
} }
@@ -0,0 +1,32 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* TESTCASE NUMBER: 1
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-35565
*/
fun case1() {
val x1: String
val x: Boolean
try {
val x0: Boolean = (throw Exception()) || true
!<!UNINITIALIZED_VARIABLE!>x<!> // UNINITIALIZED_VARIABLE should be
val a: Int = <!UNINITIALIZED_VARIABLE!>x1<!>.toInt() // UNINITIALIZED_VARIABLE should be
} catch (e: Exception) {
}
}
/*
* TESTCASE NUMBER: 2
* UNEXPECTED BEHAVIOUR
* ISSUES: KT-35565
*/
fun case2() {
val x: Boolean = false
try {
x = (throw Exception()) || true //VAL_REASSIGNMENT should be
} catch (e: Exception) {
}
}
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference // !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION // !DIAGNOSTICS: -UNREACHABLE_CODE -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT // SKIP_TXT
@@ -44,10 +44,10 @@ import contracts.*
fun case_1(value_1: Int?) { fun case_1(value_1: Int?) {
val value_2: Int val value_2: Int
if (contracts.case_1(value_1) { value_2 = 10 }) { if (contracts.case_1(value_1) { value_2 = 10 }) {
println(value_2) println(<!UNINITIALIZED_VARIABLE!>value_2<!>)
} else { } else {
value_1.inv() value_1.inv()
println(value_2) println(<!UNINITIALIZED_VARIABLE!>value_2<!>)
} }
} }
@@ -57,18 +57,18 @@ fun case_2(value_1: Int?, value_2: Int?, value_3: Any?) {
when (value_1.case_2(value_2, value_3) { value_4 = 10 }) { when (value_1.case_2(value_2, value_3) { value_4 = 10 }) {
true -> { true -> {
<!AMBIGUITY!>println<!>(value_3?.xor(true)) <!AMBIGUITY!>println<!>(value_3?.xor(true))
println(value_4) println(<!UNINITIALIZED_VARIABLE!>value_4<!>)
<!AMBIGUITY!>println<!>(value_1.inv()) <!AMBIGUITY!>println<!>(value_1.inv())
<!AMBIGUITY!>println<!>(value_2.inv()) <!AMBIGUITY!>println<!>(value_2.inv())
} }
false -> { false -> {
println(value_4) println(<!UNINITIALIZED_VARIABLE!>value_4<!>)
println(value_1) println(value_1)
println(value_2) println(value_2)
} }
null -> { null -> {
println(value_3?.xor(true)) println(value_3?.xor(true))
println(value_4) println(<!UNINITIALIZED_VARIABLE!>value_4<!>)
println(value_1) println(value_1)
println(value_2) println(value_2)
} }
@@ -12,14 +12,14 @@ fun case_1() {
fun case_2() { fun case_2() {
val value_1: Int val value_1: Int
funWithAtMostOnceCallsInPlace { value_1 = 10 } funWithAtMostOnceCallsInPlace { value_1 = 10 }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 3 // TESTCASE NUMBER: 3
fun case_3() { fun case_3() {
val value_1: Int val value_1: Int
funWithUnknownCallsInPlace { value_1 = 10 } funWithUnknownCallsInPlace { value_1 = 10 }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 4 // TESTCASE NUMBER: 4
@@ -28,8 +28,8 @@ fun case_4() {
var value_2: Int var value_2: Int
funWithAtMostOnceCallsInPlace { value_1 = 10 } funWithAtMostOnceCallsInPlace { value_1 = 10 }
funWithUnknownCallsInPlace { value_2 = 10 } funWithUnknownCallsInPlace { value_2 = 10 }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
value_2.div(10) <!UNINITIALIZED_VARIABLE!>value_2<!>.div(10)
} }
// TESTCASE NUMBER: 5 // TESTCASE NUMBER: 5
@@ -53,7 +53,7 @@ fun case_6() {
val value_1: Int val value_1: Int
for (i in 0..1) for (i in 0..1)
funWithExactlyOnceCallsInPlace { value_1 = 10 } funWithExactlyOnceCallsInPlace { value_1 = 10 }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
} }
// TESTCASE NUMBER: 7 // TESTCASE NUMBER: 7
@@ -64,12 +64,12 @@ fun case_7() {
funWithExactlyOnceCallsInPlace { value_1 = 10 } funWithExactlyOnceCallsInPlace { value_1 = 10 }
i++ i++
} }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
} }
// TESTCASE NUMBER: 8 // TESTCASE NUMBER: 8
fun case_8() { fun case_8() {
var value_1: Int var value_1: Int
if (true) funWithAtLeastOnceCallsInPlace { value_1 = 10 } if (true) funWithAtLeastOnceCallsInPlace { value_1 = 10 }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
} }
@@ -12,11 +12,11 @@ fun case_1() {
} }
} }
funWithExactlyOnceCallsInPlace { funWithExactlyOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 2 // TESTCASE NUMBER: 2
@@ -27,14 +27,14 @@ fun case_2() {
value_1 = 1 value_1 = 1
} }
funWithAtLeastOnceCallsInPlace { funWithAtLeastOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
funWithUnknownCallsInPlace { funWithUnknownCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 3 // TESTCASE NUMBER: 3
@@ -48,11 +48,11 @@ fun case_3() {
} }
} }
funWithExactlyOnceCallsInPlace { funWithExactlyOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 4 // TESTCASE NUMBER: 4
@@ -63,15 +63,15 @@ fun case_4() {
value_1 = 1 value_1 = 1
} }
funWithAtLeastOnceCallsInPlace { funWithAtLeastOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
funWithUnknownCallsInPlace { funWithUnknownCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
funWithExactlyOnceCallsInPlace { funWithExactlyOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
@@ -12,7 +12,7 @@ fun case_1(value_1: EnumClass?) {
null -> funWithExactlyOnceCallsInPlace { value_2 = 5 } null -> funWithExactlyOnceCallsInPlace { value_2 = 5 }
} }
value_2.inc() <!UNINITIALIZED_VARIABLE!>value_2<!>.inc()
} }
// TESTCASE NUMBER: 2 // TESTCASE NUMBER: 2
@@ -27,9 +27,9 @@ fun case_2(value_1: Any?) {
} else { } else {
funWithAtMostOnceCallsInPlace { value_2 = 2 } funWithAtMostOnceCallsInPlace { value_2 = 2 }
} }
value_2.dec() <!UNINITIALIZED_VARIABLE!>value_2<!>.dec()
} }
value_2.dec() <!UNINITIALIZED_VARIABLE!>value_2<!>.dec()
} }
// TESTCASE NUMBER: 3 // TESTCASE NUMBER: 3
@@ -65,9 +65,9 @@ fun case_4(value_1: EnumClassSingle?) {
funWithUnknownCallsInPlace { value_2 = 2 } funWithUnknownCallsInPlace { value_2 = 2 }
} }
} }
value_2.minus(5) <!UNINITIALIZED_VARIABLE!>value_2<!>.minus(5)
} }
value_2.minus(5) <!UNINITIALIZED_VARIABLE!>value_2<!>.minus(5)
} }
// TESTCASE NUMBER: 5 // TESTCASE NUMBER: 5
@@ -80,7 +80,7 @@ fun case_5() {
funWithAtMostOnceCallsInPlace { value_2 = 1 } funWithAtMostOnceCallsInPlace { value_2 = 1 }
} }
value_2++ <!UNINITIALIZED_VARIABLE!>value_2<!>++
} }
// TESTCASE NUMBER: 6 // TESTCASE NUMBER: 6
@@ -92,10 +92,10 @@ fun case_6() {
} catch (e: Exception) { } catch (e: Exception) {
throw Exception() throw Exception()
} finally { } finally {
println(value_2.inc()) println(<!UNINITIALIZED_VARIABLE!>value_2<!>.inc())
} }
value_2++ <!UNINITIALIZED_VARIABLE!>value_2<!>++
} }
// TESTCASE NUMBER: 7 // TESTCASE NUMBER: 7
@@ -112,7 +112,7 @@ fun case_7() {
} }
} }
println(value_1.inc()) println(<!UNINITIALIZED_VARIABLE!>value_1<!>.inc())
} }
// TESTCASE NUMBER: 8 // TESTCASE NUMBER: 8
@@ -127,7 +127,7 @@ fun case_8() {
} }
throw Exception() throw Exception()
} }
println(x.inc()) println(<!UNINITIALIZED_VARIABLE!>x<!>.inc())
} }
// TESTCASE NUMBER: 9 // TESTCASE NUMBER: 9
@@ -139,7 +139,7 @@ fun case_9() {
return@outer return@outer
} }
} }
println(x.inc()) println(<!UNINITIALIZED_VARIABLE!>x<!>.inc())
} }
// TESTCASE NUMBER: 10 // TESTCASE NUMBER: 10
@@ -156,5 +156,5 @@ fun case_10() {
} }
return@outer return@outer
} }
println(x.inc()) println(<!UNINITIALIZED_VARIABLE!>x<!>.inc())
} }
@@ -8,7 +8,7 @@ fun case_1() {
val value_1 = 10 val value_1 = 10
value_1.inc() value_1.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 2 // TESTCASE NUMBER: 2
@@ -24,7 +24,7 @@ fun case_2() {
} }
value_1.inc() value_1.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 3 // TESTCASE NUMBER: 3
@@ -36,14 +36,14 @@ fun case_3() {
value_1 = 10 value_1 = 10
} }
funWithAtMostOnceCallsInPlace { funWithAtMostOnceCallsInPlace {
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
funWithAtMostOnceCallsInPlace { funWithAtMostOnceCallsInPlace {
value_1 = 10 value_1 = 10
} }
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 4 // TESTCASE NUMBER: 4
@@ -62,7 +62,7 @@ fun case_4() {
funWithAtMostOnceCallsInPlace { funWithAtMostOnceCallsInPlace {
value_1 = 1 value_1 = 1
} }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
} }
// TESTCASE NUMBER: 5 // TESTCASE NUMBER: 5
@@ -81,5 +81,5 @@ fun case_5() {
funWithUnknownCallsInPlace { funWithUnknownCallsInPlace {
value_1 = 1 value_1 = 1
} }
value_1.dec() <!UNINITIALIZED_VARIABLE!>value_1<!>.dec()
} }
@@ -13,7 +13,7 @@ fun case_2() {
var value_1: Int var value_1: Int
val l = { value_1 = 10 } val l = { value_1 = 10 }
funWithAtLeastOnceCallsInPlace(l) funWithAtLeastOnceCallsInPlace(l)
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 3 // TESTCASE NUMBER: 3
@@ -21,7 +21,7 @@ fun case_3() {
var value_1: Int var value_1: Int
val l = fun () { value_1 = 10 } val l = fun () { value_1 = 10 }
funWithAtLeastOnceCallsInPlace(l) funWithAtLeastOnceCallsInPlace(l)
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
// TESTCASE NUMBER: 4 // TESTCASE NUMBER: 4
@@ -38,5 +38,5 @@ fun case_5() {
fun l() { value_1 = 10 } fun l() { value_1 = 10 }
} }
funWithExactlyOnceCallsInPlace(o::l) funWithExactlyOnceCallsInPlace(o::l)
value_1.inc() <!UNINITIALIZED_VARIABLE!>value_1<!>.inc()
} }
@@ -17,12 +17,12 @@ fun case_2(arg: Int?) {
fun case_3() { fun case_3() {
val value_1: Boolean? val value_1: Boolean?
funWithAtMostOnceCallsInPlace { value_1 = false } funWithAtMostOnceCallsInPlace { value_1 = false }
value_1.<!INAPPLICABLE_CANDIDATE!>not<!>() <!UNINITIALIZED_VARIABLE!>value_1<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
} }
// TESTCASE NUMBER: 4 // TESTCASE NUMBER: 4
fun case_4() { fun case_4() {
val value_1: Boolean? val value_1: Boolean?
funWithUnknownCallsInPlace { value_1 = true } funWithUnknownCallsInPlace { value_1 = true }
value_1.<!INAPPLICABLE_CANDIDATE!>not<!>() <!UNINITIALIZED_VARIABLE!>value_1<!>.<!INAPPLICABLE_CANDIDATE!>not<!>()
} }
@@ -85,6 +85,6 @@ fun case_6() {
null!! null!!
} }
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!> <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?"), UNINITIALIZED_VARIABLE!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!AMBIGUITY!>minus<!>(10.0) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?"), UNINITIALIZED_VARIABLE!>x<!>.<!AMBIGUITY!>minus<!>(10.0)
} }