[FIR] Add data flow analysis for FirCheckNotNullCall.
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
692a83f7bb
commit
6e00df06e8
+20
-4
@@ -7,7 +7,10 @@ package org.jetbrains.kotlin.fir.resolve.dfa
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.fir.FirElement
|
import org.jetbrains.kotlin.fir.FirElement
|
||||||
import org.jetbrains.kotlin.fir.FirSymbolOwner
|
import org.jetbrains.kotlin.fir.FirSymbolOwner
|
||||||
import org.jetbrains.kotlin.fir.contracts.description.*
|
import org.jetbrains.kotlin.fir.contracts.description.ConeBooleanConstantReference
|
||||||
|
import org.jetbrains.kotlin.fir.contracts.description.ConeConditionalEffectDeclaration
|
||||||
|
import org.jetbrains.kotlin.fir.contracts.description.ConeConstantReference
|
||||||
|
import org.jetbrains.kotlin.fir.contracts.description.ConeReturnsEffectDeclaration
|
||||||
import org.jetbrains.kotlin.fir.declarations.*
|
import org.jetbrains.kotlin.fir.declarations.*
|
||||||
import org.jetbrains.kotlin.fir.expressions.*
|
import org.jetbrains.kotlin.fir.expressions.*
|
||||||
import org.jetbrains.kotlin.fir.expressions.impl.FirThisReceiverExpressionImpl
|
import org.jetbrains.kotlin.fir.expressions.impl.FirThisReceiverExpressionImpl
|
||||||
@@ -24,10 +27,10 @@ import org.jetbrains.kotlin.fir.resolve.dfa.contracts.createArgumentsMapping
|
|||||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformer
|
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirAbstractBodyResolveTransformer
|
||||||
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType
|
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.resultType
|
||||||
import org.jetbrains.kotlin.fir.resolve.withNullability
|
import org.jetbrains.kotlin.fir.resolve.withNullability
|
||||||
import org.jetbrains.kotlin.fir.resolvedTypeFromPrototype
|
|
||||||
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
|
import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol
|
||||||
import org.jetbrains.kotlin.fir.symbols.CallableId
|
import org.jetbrains.kotlin.fir.symbols.CallableId
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||||
|
import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol
|
||||||
import org.jetbrains.kotlin.fir.types.*
|
import org.jetbrains.kotlin.fir.types.*
|
||||||
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
import org.jetbrains.kotlin.fir.visitors.transformSingle
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
@@ -143,7 +146,7 @@ class FirDataFlowAnalyzer(private val components: FirAbstractBodyResolveTransfor
|
|||||||
|
|
||||||
if (typeOperatorCall.operation !in FirOperation.TYPES) return
|
if (typeOperatorCall.operation !in FirOperation.TYPES) return
|
||||||
val type = typeOperatorCall.conversionTypeRef.coneTypeSafe<ConeKotlinType>() ?: return
|
val type = typeOperatorCall.conversionTypeRef.coneTypeSafe<ConeKotlinType>() ?: return
|
||||||
val operandVariable = getOrCreateRealVariable(typeOperatorCall.argument)?.variableUnderAlias ?: return
|
val operandVariable = getOrCreateRealVariable(typeOperatorCall.argument) ?: return
|
||||||
|
|
||||||
val flow = node.flow
|
val flow = node.flow
|
||||||
when (typeOperatorCall.operation) {
|
when (typeOperatorCall.operation) {
|
||||||
@@ -339,6 +342,19 @@ class FirDataFlowAnalyzer(private val components: FirAbstractBodyResolveTransfor
|
|||||||
graphBuilder.exitJump(jump).mergeIncomingFlow()
|
graphBuilder.exitJump(jump).mergeIncomingFlow()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------- Check not null call -----------------------------------
|
||||||
|
|
||||||
|
fun exitCheckNotNullCall(checkNotNullCall: FirCheckNotNullCall) {
|
||||||
|
// Add `Any` to the set of possible types; the intersection type `T? & Any` will be reduced to `T` after smartcast.
|
||||||
|
val node = graphBuilder.exitCheckNotNullCall(checkNotNullCall).mergeIncomingFlow()
|
||||||
|
val operandVariable = getOrCreateRealVariable(checkNotNullCall.argument) ?: return
|
||||||
|
logicSystem.addApprovedInfo(
|
||||||
|
node.flow,
|
||||||
|
operandVariable,
|
||||||
|
FirDataFlowInfo(setOf(session.builtinTypes.anyType.coneTypeUnsafe()), emptySet())
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------- When -----------------------------------
|
// ----------------------------------- When -----------------------------------
|
||||||
|
|
||||||
fun enterWhenExpression(whenExpression: FirWhenExpression) {
|
fun enterWhenExpression(whenExpression: FirWhenExpression) {
|
||||||
@@ -837,7 +853,7 @@ class FirDataFlowAnalyzer(private val components: FirAbstractBodyResolveTransfor
|
|||||||
if (fir is FirThisReceiverExpressionImpl) {
|
if (fir is FirThisReceiverExpressionImpl) {
|
||||||
return variableStorage.getOrCreateNewThisRealVariable(fir.calleeReference.boundSymbol ?: return null)
|
return variableStorage.getOrCreateNewThisRealVariable(fir.calleeReference.boundSymbol ?: return null)
|
||||||
}
|
}
|
||||||
val symbol: AbstractFirBasedSymbol<*> = fir.resolvedSymbol ?: return null
|
val symbol = fir.resolvedSymbol as? FirVariableSymbol<*> ?: return null
|
||||||
return variableStorage.getOrCreateNewRealVariable(symbol).variableUnderAlias
|
return variableStorage.getOrCreateNewRealVariable(symbol).variableUnderAlias
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -125,6 +125,10 @@ class OperatorCallNode(owner: ControlFlowGraph, override val fir: FirOperatorCal
|
|||||||
class JumpNode(owner: ControlFlowGraph, override val fir: FirJump<*>, level: Int) : CFGNode<FirJump<*>>(owner, level)
|
class JumpNode(owner: ControlFlowGraph, override val fir: FirJump<*>, level: Int) : CFGNode<FirJump<*>>(owner, level)
|
||||||
class ConstExpressionNode(owner: ControlFlowGraph, override val fir: FirConstExpression<*>, level: Int) : CFGNode<FirConstExpression<*>>(owner, level)
|
class ConstExpressionNode(owner: ControlFlowGraph, override val fir: FirConstExpression<*>, level: Int) : CFGNode<FirConstExpression<*>>(owner, level)
|
||||||
|
|
||||||
|
// ----------------------------------- Check not null call -----------------------------------
|
||||||
|
|
||||||
|
class CheckNotNullCallNode(owner: ControlFlowGraph, override val fir: FirCheckNotNullCall, level: Int) : CFGNode<FirCheckNotNullCall>(owner, level)
|
||||||
|
|
||||||
// ----------------------------------- Resolvable call -----------------------------------
|
// ----------------------------------- Resolvable call -----------------------------------
|
||||||
|
|
||||||
class QualifiedAccessNode(
|
class QualifiedAccessNode(
|
||||||
|
|||||||
+6
@@ -229,6 +229,12 @@ class ControlFlowGraphBuilder {
|
|||||||
return node
|
return node
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------- Check not null call -----------------------------------
|
||||||
|
|
||||||
|
fun exitCheckNotNullCall(checkNotNullCall: FirCheckNotNullCall): CheckNotNullCallNode {
|
||||||
|
return createCheckNotNullCallNode(checkNotNullCall).also { addNewSimpleNode(it) }
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------- When -----------------------------------
|
// ----------------------------------- When -----------------------------------
|
||||||
|
|
||||||
fun enterWhenExpression(whenExpression: FirWhenExpression): WhenEnterNode {
|
fun enterWhenExpression(whenExpression: FirWhenExpression): WhenEnterNode {
|
||||||
|
|||||||
+3
@@ -34,6 +34,9 @@ fun ControlFlowGraphBuilder.createWhenBranchConditionExitNode(fir: FirWhenBranch
|
|||||||
fun ControlFlowGraphBuilder.createJumpNode(fir: FirJump<*>): JumpNode =
|
fun ControlFlowGraphBuilder.createJumpNode(fir: FirJump<*>): JumpNode =
|
||||||
JumpNode(graph, fir, levelCounter)
|
JumpNode(graph, fir, levelCounter)
|
||||||
|
|
||||||
|
fun ControlFlowGraphBuilder.createCheckNotNullCallNode(fir: FirCheckNotNullCall): CheckNotNullCallNode =
|
||||||
|
CheckNotNullCallNode(graph, fir, levelCounter)
|
||||||
|
|
||||||
fun ControlFlowGraphBuilder.createQualifiedAccessNode(fir: FirQualifiedAccessExpression): QualifiedAccessNode =
|
fun ControlFlowGraphBuilder.createQualifiedAccessNode(fir: FirQualifiedAccessExpression): QualifiedAccessNode =
|
||||||
QualifiedAccessNode(graph, fir, levelCounter)
|
QualifiedAccessNode(graph, fir, levelCounter)
|
||||||
|
|
||||||
|
|||||||
+1
@@ -110,6 +110,7 @@ fun CFGNode<*>.render(): String =
|
|||||||
is TypeOperatorCallNode -> "Type operator: \"${fir.psi?.text?.toString() ?: fir.render()}\""
|
is TypeOperatorCallNode -> "Type operator: \"${fir.psi?.text?.toString() ?: fir.render()}\""
|
||||||
is JumpNode -> "Jump: ${fir.render()}"
|
is JumpNode -> "Jump: ${fir.render()}"
|
||||||
is StubNode -> "Stub"
|
is StubNode -> "Stub"
|
||||||
|
is CheckNotNullCallNode -> "Check not null: ${fir.render()}"
|
||||||
|
|
||||||
is ConstExpressionNode -> "Const: ${fir.render()}"
|
is ConstExpressionNode -> "Const: ${fir.render()}"
|
||||||
is VariableDeclarationNode ->
|
is VariableDeclarationNode ->
|
||||||
|
|||||||
+1
-1
@@ -308,7 +308,7 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
|||||||
FirErrorTypeRefImpl(null, FirSimpleDiagnostic("Can't resolve !! operator call", DiagnosticKind.InferenceError))
|
FirErrorTypeRefImpl(null, FirSimpleDiagnostic("Can't resolve !! operator call", DiagnosticKind.InferenceError))
|
||||||
checkNotNullCall
|
checkNotNullCall
|
||||||
}
|
}
|
||||||
// TODO: Data flow analysis
|
dataFlowAnalyzer.exitCheckNotNullCall(result)
|
||||||
return result.compose()
|
return result.compose()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+243
-599
@@ -14,55 +14,12 @@ digraph bangbang_kt {
|
|||||||
subgraph cluster_1 {
|
subgraph cluster_1 {
|
||||||
color=red
|
color=red
|
||||||
2 [label="Enter function test_0" style="filled" fillcolor=red];
|
2 [label="Enter function test_0" style="filled" fillcolor=red];
|
||||||
subgraph cluster_2 {
|
3 [label="Access variable R|<local>/a|"];
|
||||||
color=blue
|
4 [label="Check not null: R|<local>/a|!!"];
|
||||||
3 [label="Enter when"];
|
5 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
4 [label="Access variable R|<local>/a|"];
|
6 [label="Access variable R|<local>/a|"];
|
||||||
5 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
7 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
subgraph cluster_3 {
|
8 [label="Exit function test_0" style="filled" fillcolor=red];
|
||||||
color=blue
|
|
||||||
6 [label="Enter when branch condition "];
|
|
||||||
7 [label="Const: Null(null)"];
|
|
||||||
8 [label="Operator =="];
|
|
||||||
9 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_4 {
|
|
||||||
color=blue
|
|
||||||
10 [label="Enter when branch condition else"];
|
|
||||||
11 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
12 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_5 {
|
|
||||||
color=blue
|
|
||||||
13 [label="Enter block"];
|
|
||||||
14 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
15 [label="Exit block"];
|
|
||||||
}
|
|
||||||
16 [label="Exit when branch result"];
|
|
||||||
17 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_6 {
|
|
||||||
color=blue
|
|
||||||
18 [label="Enter block"];
|
|
||||||
19 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
20 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
21 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
22 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
23 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
24 [label="Exit when"];
|
|
||||||
}
|
|
||||||
25 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
26 [label="Access variable R|<local>/a|"];
|
|
||||||
27 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
28 [label="Exit function test_0" style="filled" fillcolor=red];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
2 -> {3};
|
2 -> {3};
|
||||||
@@ -71,643 +28,330 @@ digraph bangbang_kt {
|
|||||||
5 -> {6};
|
5 -> {6};
|
||||||
6 -> {7};
|
6 -> {7};
|
||||||
7 -> {8};
|
7 -> {8};
|
||||||
8 -> {9};
|
|
||||||
9 -> {17 10};
|
subgraph cluster_2 {
|
||||||
|
color=red
|
||||||
|
9 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_3 {
|
||||||
|
color=blue
|
||||||
|
10 [label="Enter when"];
|
||||||
|
subgraph cluster_4 {
|
||||||
|
color=blue
|
||||||
|
11 [label="Enter when branch condition "];
|
||||||
|
12 [label="Access variable R|<local>/a|"];
|
||||||
|
13 [label="Check not null: R|<local>/a|!!"];
|
||||||
|
14 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
|
15 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
16 [label="Synthetic else branch"];
|
||||||
|
17 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_5 {
|
||||||
|
color=blue
|
||||||
|
18 [label="Enter block"];
|
||||||
|
19 [label="Access variable R|<local>/a|"];
|
||||||
|
20 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
|
21 [label="Exit block"];
|
||||||
|
}
|
||||||
|
22 [label="Exit when branch result"];
|
||||||
|
23 [label="Exit when"];
|
||||||
|
}
|
||||||
|
24 [label="Access variable R|<local>/a|"];
|
||||||
|
25 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
|
26 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
9 -> {10};
|
||||||
10 -> {11};
|
10 -> {11};
|
||||||
11 -> {12};
|
11 -> {12};
|
||||||
12 -> {13};
|
12 -> {13};
|
||||||
13 -> {14};
|
13 -> {14};
|
||||||
14 -> {15};
|
14 -> {15};
|
||||||
15 -> {16};
|
15 -> {17 16};
|
||||||
16 -> {24};
|
16 -> {23};
|
||||||
17 -> {18};
|
17 -> {18};
|
||||||
18 -> {19};
|
18 -> {19};
|
||||||
19 -> {20};
|
19 -> {20};
|
||||||
20 -> {28};
|
20 -> {21};
|
||||||
20 -> {21} [style=dotted];
|
21 -> {22};
|
||||||
21 -> {22} [style=dotted];
|
22 -> {23};
|
||||||
22 -> {23} [style=dotted];
|
23 -> {24};
|
||||||
23 -> {24} [style=dotted];
|
|
||||||
24 -> {25};
|
24 -> {25};
|
||||||
25 -> {26};
|
25 -> {26};
|
||||||
26 -> {27};
|
|
||||||
27 -> {28};
|
|
||||||
|
|
||||||
subgraph cluster_7 {
|
subgraph cluster_6 {
|
||||||
color=red
|
color=red
|
||||||
29 [label="Enter function test_1" style="filled" fillcolor=red];
|
27 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||||
subgraph cluster_8 {
|
subgraph cluster_7 {
|
||||||
color=blue
|
color=blue
|
||||||
30 [label="Enter when"];
|
28 [label="Enter when"];
|
||||||
subgraph cluster_9 {
|
subgraph cluster_8 {
|
||||||
color=blue
|
color=blue
|
||||||
31 [label="Enter when branch condition "];
|
29 [label="Enter when branch condition "];
|
||||||
subgraph cluster_10 {
|
subgraph cluster_9 {
|
||||||
color=blue
|
color=blue
|
||||||
32 [label="Enter when"];
|
30 [label="Enter &&"];
|
||||||
33 [label="Access variable R|<local>/a|"];
|
31 [label="Access variable R|<local>/a|"];
|
||||||
34 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
32 [label="Check not null: R|<local>/a|!!"];
|
||||||
subgraph cluster_11 {
|
33 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
color=blue
|
34 [label="Exit left part of &&"];
|
||||||
35 [label="Enter when branch condition "];
|
35 [label="Enter right part of &&"];
|
||||||
36 [label="Const: Null(null)"];
|
36 [label="Access variable R|<local>/b|"];
|
||||||
37 [label="Operator =="];
|
37 [label="Exit &&"];
|
||||||
38 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_12 {
|
|
||||||
color=blue
|
|
||||||
39 [label="Enter when branch condition else"];
|
|
||||||
40 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
41 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_13 {
|
|
||||||
color=blue
|
|
||||||
42 [label="Enter block"];
|
|
||||||
43 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
44 [label="Exit block"];
|
|
||||||
}
|
|
||||||
45 [label="Exit when branch result"];
|
|
||||||
46 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_14 {
|
|
||||||
color=blue
|
|
||||||
47 [label="Enter block"];
|
|
||||||
48 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
49 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
50 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
51 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
52 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
53 [label="Exit when"];
|
|
||||||
}
|
}
|
||||||
54 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
38 [label="Exit when branch condition"];
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
55 [label="Exit when branch condition"];
|
|
||||||
}
|
}
|
||||||
56 [label="Synthetic else branch"];
|
39 [label="Synthetic else branch"];
|
||||||
57 [label="Enter when branch result"];
|
40 [label="Enter when branch result"];
|
||||||
subgraph cluster_15 {
|
subgraph cluster_10 {
|
||||||
color=blue
|
color=blue
|
||||||
58 [label="Enter block"];
|
41 [label="Enter block"];
|
||||||
59 [label="Access variable R|<local>/a|"];
|
42 [label="Access variable R|<local>/a|"];
|
||||||
60 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
43 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
61 [label="Exit block"];
|
44 [label="Exit block"];
|
||||||
}
|
}
|
||||||
62 [label="Exit when branch result"];
|
45 [label="Exit when branch result"];
|
||||||
63 [label="Exit when"];
|
46 [label="Exit when"];
|
||||||
}
|
}
|
||||||
64 [label="Access variable R|<local>/a|"];
|
47 [label="Access variable R|<local>/a|"];
|
||||||
65 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
48 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
66 [label="Exit function test_1" style="filled" fillcolor=red];
|
49 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
27 -> {28};
|
||||||
|
28 -> {29};
|
||||||
29 -> {30};
|
29 -> {30};
|
||||||
30 -> {31};
|
30 -> {31};
|
||||||
31 -> {32};
|
31 -> {32};
|
||||||
32 -> {33};
|
32 -> {33};
|
||||||
33 -> {34};
|
33 -> {34};
|
||||||
34 -> {35};
|
34 -> {37 35};
|
||||||
35 -> {36};
|
35 -> {36};
|
||||||
36 -> {37};
|
36 -> {37};
|
||||||
37 -> {38};
|
37 -> {38};
|
||||||
38 -> {46 39};
|
38 -> {40 39};
|
||||||
39 -> {40};
|
39 -> {46};
|
||||||
40 -> {41};
|
40 -> {41};
|
||||||
41 -> {42};
|
41 -> {42};
|
||||||
42 -> {43};
|
42 -> {43};
|
||||||
43 -> {44};
|
43 -> {44};
|
||||||
44 -> {45};
|
44 -> {45};
|
||||||
45 -> {53};
|
45 -> {46};
|
||||||
46 -> {47};
|
46 -> {47};
|
||||||
47 -> {48};
|
47 -> {48};
|
||||||
48 -> {49};
|
48 -> {49};
|
||||||
49 -> {66};
|
|
||||||
49 -> {50} [style=dotted];
|
subgraph cluster_11 {
|
||||||
50 -> {51} [style=dotted];
|
color=red
|
||||||
51 -> {52} [style=dotted];
|
50 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||||
52 -> {53} [style=dotted];
|
subgraph cluster_12 {
|
||||||
|
color=blue
|
||||||
|
51 [label="Enter when"];
|
||||||
|
subgraph cluster_13 {
|
||||||
|
color=blue
|
||||||
|
52 [label="Enter when branch condition "];
|
||||||
|
subgraph cluster_14 {
|
||||||
|
color=blue
|
||||||
|
53 [label="Enter &&"];
|
||||||
|
54 [label="Access variable R|<local>/b|"];
|
||||||
|
55 [label="Exit left part of &&"];
|
||||||
|
56 [label="Enter right part of &&"];
|
||||||
|
57 [label="Access variable R|<local>/a|"];
|
||||||
|
58 [label="Check not null: R|<local>/a|!!"];
|
||||||
|
59 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
|
60 [label="Exit &&"];
|
||||||
|
}
|
||||||
|
61 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
62 [label="Synthetic else branch"];
|
||||||
|
63 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_15 {
|
||||||
|
color=blue
|
||||||
|
64 [label="Enter block"];
|
||||||
|
65 [label="Access variable R|<local>/a|"];
|
||||||
|
66 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
|
67 [label="Exit block"];
|
||||||
|
}
|
||||||
|
68 [label="Exit when branch result"];
|
||||||
|
69 [label="Exit when"];
|
||||||
|
}
|
||||||
|
70 [label="Access variable R|<local>/a|"];
|
||||||
|
71 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
||||||
|
72 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
|
50 -> {51};
|
||||||
|
51 -> {52};
|
||||||
|
52 -> {53};
|
||||||
53 -> {54};
|
53 -> {54};
|
||||||
54 -> {55};
|
54 -> {55};
|
||||||
55 -> {57 56};
|
55 -> {60 56};
|
||||||
56 -> {63};
|
56 -> {57};
|
||||||
57 -> {58};
|
57 -> {58};
|
||||||
58 -> {59};
|
58 -> {59};
|
||||||
59 -> {60};
|
59 -> {60};
|
||||||
60 -> {61};
|
60 -> {61};
|
||||||
61 -> {62};
|
61 -> {63 62};
|
||||||
62 -> {63};
|
62 -> {69};
|
||||||
63 -> {64};
|
63 -> {64};
|
||||||
64 -> {65};
|
64 -> {65};
|
||||||
65 -> {66};
|
65 -> {66};
|
||||||
|
66 -> {67};
|
||||||
subgraph cluster_16 {
|
|
||||||
color=red
|
|
||||||
67 [label="Enter function test_2" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_17 {
|
|
||||||
color=blue
|
|
||||||
68 [label="Enter when"];
|
|
||||||
subgraph cluster_18 {
|
|
||||||
color=blue
|
|
||||||
69 [label="Enter when branch condition "];
|
|
||||||
subgraph cluster_19 {
|
|
||||||
color=blue
|
|
||||||
70 [label="Enter &&"];
|
|
||||||
subgraph cluster_20 {
|
|
||||||
color=blue
|
|
||||||
71 [label="Enter when"];
|
|
||||||
72 [label="Access variable R|<local>/a|"];
|
|
||||||
73 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
|
||||||
subgraph cluster_21 {
|
|
||||||
color=blue
|
|
||||||
74 [label="Enter when branch condition "];
|
|
||||||
75 [label="Const: Null(null)"];
|
|
||||||
76 [label="Operator =="];
|
|
||||||
77 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_22 {
|
|
||||||
color=blue
|
|
||||||
78 [label="Enter when branch condition else"];
|
|
||||||
79 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
80 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_23 {
|
|
||||||
color=blue
|
|
||||||
81 [label="Enter block"];
|
|
||||||
82 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
83 [label="Exit block"];
|
|
||||||
}
|
|
||||||
84 [label="Exit when branch result"];
|
|
||||||
85 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_24 {
|
|
||||||
color=blue
|
|
||||||
86 [label="Enter block"];
|
|
||||||
87 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
88 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
89 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
90 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
91 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
92 [label="Exit when"];
|
|
||||||
}
|
|
||||||
93 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
94 [label="Exit left part of &&"];
|
|
||||||
95 [label="Enter right part of &&"];
|
|
||||||
96 [label="Access variable R|<local>/b|"];
|
|
||||||
97 [label="Exit &&"];
|
|
||||||
}
|
|
||||||
98 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
99 [label="Synthetic else branch"];
|
|
||||||
100 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_25 {
|
|
||||||
color=blue
|
|
||||||
101 [label="Enter block"];
|
|
||||||
102 [label="Access variable R|<local>/a|"];
|
|
||||||
103 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
104 [label="Exit block"];
|
|
||||||
}
|
|
||||||
105 [label="Exit when branch result"];
|
|
||||||
106 [label="Exit when"];
|
|
||||||
}
|
|
||||||
107 [label="Access variable R|<local>/a|"];
|
|
||||||
108 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
109 [label="Exit function test_2" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
|
|
||||||
67 -> {68};
|
67 -> {68};
|
||||||
68 -> {69};
|
68 -> {69};
|
||||||
69 -> {70};
|
69 -> {70};
|
||||||
70 -> {71};
|
70 -> {71};
|
||||||
71 -> {72};
|
71 -> {72};
|
||||||
72 -> {73};
|
|
||||||
|
subgraph cluster_16 {
|
||||||
|
color=red
|
||||||
|
73 [label="Enter function test_4" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_17 {
|
||||||
|
color=blue
|
||||||
|
74 [label="Enter when"];
|
||||||
|
subgraph cluster_18 {
|
||||||
|
color=blue
|
||||||
|
75 [label="Enter when branch condition "];
|
||||||
|
subgraph cluster_19 {
|
||||||
|
color=blue
|
||||||
|
76 [label="Enter ||"];
|
||||||
|
77 [label="Access variable R|<local>/a|"];
|
||||||
|
78 [label="Check not null: R|<local>/a|!!"];
|
||||||
|
79 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
|
80 [label="Exit left part of ||"];
|
||||||
|
81 [label="Enter right part of ||"];
|
||||||
|
82 [label="Access variable R|<local>/b|"];
|
||||||
|
83 [label="Exit ||"];
|
||||||
|
}
|
||||||
|
84 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
85 [label="Synthetic else branch"];
|
||||||
|
86 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_20 {
|
||||||
|
color=blue
|
||||||
|
87 [label="Enter block"];
|
||||||
|
88 [label="Access variable R|<local>/a|"];
|
||||||
|
89 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
|
90 [label="Exit block"];
|
||||||
|
}
|
||||||
|
91 [label="Exit when branch result"];
|
||||||
|
92 [label="Exit when"];
|
||||||
|
}
|
||||||
|
93 [label="Access variable R|<local>/a|"];
|
||||||
|
94 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
||||||
|
95 [label="Exit function test_4" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
73 -> {74};
|
73 -> {74};
|
||||||
74 -> {75};
|
74 -> {75};
|
||||||
75 -> {76};
|
75 -> {76};
|
||||||
76 -> {77};
|
76 -> {77};
|
||||||
77 -> {85 78};
|
77 -> {78};
|
||||||
78 -> {79};
|
78 -> {79};
|
||||||
79 -> {80};
|
79 -> {80};
|
||||||
80 -> {81};
|
80 -> {83 81};
|
||||||
81 -> {82};
|
81 -> {82};
|
||||||
82 -> {83};
|
82 -> {83};
|
||||||
83 -> {84};
|
83 -> {84};
|
||||||
84 -> {92};
|
84 -> {86 85};
|
||||||
85 -> {86};
|
85 -> {92};
|
||||||
86 -> {87};
|
86 -> {87};
|
||||||
87 -> {88};
|
87 -> {88};
|
||||||
88 -> {109};
|
88 -> {89};
|
||||||
88 -> {89} [style=dotted];
|
89 -> {90};
|
||||||
89 -> {90} [style=dotted];
|
90 -> {91};
|
||||||
90 -> {91} [style=dotted];
|
91 -> {92};
|
||||||
91 -> {92} [style=dotted];
|
|
||||||
92 -> {93};
|
92 -> {93};
|
||||||
93 -> {94};
|
93 -> {94};
|
||||||
94 -> {97 95};
|
94 -> {95};
|
||||||
95 -> {96};
|
|
||||||
|
subgraph cluster_21 {
|
||||||
|
color=red
|
||||||
|
96 [label="Enter function test_5" style="filled" fillcolor=red];
|
||||||
|
subgraph cluster_22 {
|
||||||
|
color=blue
|
||||||
|
97 [label="Enter when"];
|
||||||
|
subgraph cluster_23 {
|
||||||
|
color=blue
|
||||||
|
98 [label="Enter when branch condition "];
|
||||||
|
subgraph cluster_24 {
|
||||||
|
color=blue
|
||||||
|
99 [label="Enter ||"];
|
||||||
|
100 [label="Access variable R|<local>/b|"];
|
||||||
|
101 [label="Exit left part of ||"];
|
||||||
|
102 [label="Enter right part of ||"];
|
||||||
|
103 [label="Access variable R|<local>/a|"];
|
||||||
|
104 [label="Check not null: R|<local>/a|!!"];
|
||||||
|
105 [label="Function call: R|<local>/a|!!.R|/A.foo|()"];
|
||||||
|
106 [label="Exit ||"];
|
||||||
|
}
|
||||||
|
107 [label="Exit when branch condition"];
|
||||||
|
}
|
||||||
|
108 [label="Synthetic else branch"];
|
||||||
|
109 [label="Enter when branch result"];
|
||||||
|
subgraph cluster_25 {
|
||||||
|
color=blue
|
||||||
|
110 [label="Enter block"];
|
||||||
|
111 [label="Access variable R|<local>/a|"];
|
||||||
|
112 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
||||||
|
113 [label="Exit block"];
|
||||||
|
}
|
||||||
|
114 [label="Exit when branch result"];
|
||||||
|
115 [label="Exit when"];
|
||||||
|
}
|
||||||
|
116 [label="Access variable R|<local>/a|"];
|
||||||
|
117 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
||||||
|
118 [label="Exit function test_5" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
96 -> {97};
|
96 -> {97};
|
||||||
97 -> {98};
|
97 -> {98};
|
||||||
98 -> {100 99};
|
98 -> {99};
|
||||||
99 -> {106};
|
99 -> {100};
|
||||||
100 -> {101};
|
100 -> {101};
|
||||||
101 -> {102};
|
101 -> {106 102};
|
||||||
102 -> {103};
|
102 -> {103};
|
||||||
103 -> {104};
|
103 -> {104};
|
||||||
104 -> {105};
|
104 -> {105};
|
||||||
105 -> {106};
|
105 -> {106};
|
||||||
106 -> {107};
|
106 -> {107};
|
||||||
107 -> {108};
|
107 -> {109 108};
|
||||||
108 -> {109};
|
108 -> {115};
|
||||||
|
109 -> {110};
|
||||||
subgraph cluster_26 {
|
|
||||||
color=red
|
|
||||||
110 [label="Enter function test_3" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_27 {
|
|
||||||
color=blue
|
|
||||||
111 [label="Enter when"];
|
|
||||||
subgraph cluster_28 {
|
|
||||||
color=blue
|
|
||||||
112 [label="Enter when branch condition "];
|
|
||||||
subgraph cluster_29 {
|
|
||||||
color=blue
|
|
||||||
113 [label="Enter &&"];
|
|
||||||
114 [label="Access variable R|<local>/b|"];
|
|
||||||
115 [label="Exit left part of &&"];
|
|
||||||
116 [label="Enter right part of &&"];
|
|
||||||
subgraph cluster_30 {
|
|
||||||
color=blue
|
|
||||||
117 [label="Enter when"];
|
|
||||||
118 [label="Access variable R|<local>/a|"];
|
|
||||||
119 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
|
||||||
subgraph cluster_31 {
|
|
||||||
color=blue
|
|
||||||
120 [label="Enter when branch condition "];
|
|
||||||
121 [label="Const: Null(null)"];
|
|
||||||
122 [label="Operator =="];
|
|
||||||
123 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_32 {
|
|
||||||
color=blue
|
|
||||||
124 [label="Enter when branch condition else"];
|
|
||||||
125 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
126 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_33 {
|
|
||||||
color=blue
|
|
||||||
127 [label="Enter block"];
|
|
||||||
128 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
129 [label="Exit block"];
|
|
||||||
}
|
|
||||||
130 [label="Exit when branch result"];
|
|
||||||
131 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_34 {
|
|
||||||
color=blue
|
|
||||||
132 [label="Enter block"];
|
|
||||||
133 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
134 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
135 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
136 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
137 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
138 [label="Exit when"];
|
|
||||||
}
|
|
||||||
139 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
140 [label="Exit &&"];
|
|
||||||
}
|
|
||||||
141 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
142 [label="Synthetic else branch"];
|
|
||||||
143 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_35 {
|
|
||||||
color=blue
|
|
||||||
144 [label="Enter block"];
|
|
||||||
145 [label="Access variable R|<local>/a|"];
|
|
||||||
146 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
147 [label="Exit block"];
|
|
||||||
}
|
|
||||||
148 [label="Exit when branch result"];
|
|
||||||
149 [label="Exit when"];
|
|
||||||
}
|
|
||||||
150 [label="Access variable R|<local>/a|"];
|
|
||||||
151 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
|
||||||
152 [label="Exit function test_3" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
|
|
||||||
110 -> {111};
|
110 -> {111};
|
||||||
111 -> {112};
|
111 -> {112};
|
||||||
112 -> {113};
|
112 -> {113};
|
||||||
113 -> {114};
|
113 -> {114};
|
||||||
114 -> {115};
|
114 -> {115};
|
||||||
115 -> {140 116};
|
115 -> {116};
|
||||||
116 -> {117};
|
116 -> {117};
|
||||||
117 -> {118};
|
117 -> {118};
|
||||||
118 -> {119};
|
|
||||||
|
subgraph cluster_26 {
|
||||||
|
color=red
|
||||||
|
119 [label="Enter function test_6" style="filled" fillcolor=red];
|
||||||
|
120 [label="Access variable R|<local>/x|"];
|
||||||
|
121 [label="Check not null: R|<local>/x|!!"];
|
||||||
|
122 [label="Function call: R|<local>/x|!!.R|/A.foo|()"];
|
||||||
|
123 [label="Exit function test_6" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
119 -> {120};
|
119 -> {120};
|
||||||
120 -> {121};
|
120 -> {121};
|
||||||
121 -> {122};
|
121 -> {122};
|
||||||
122 -> {123};
|
122 -> {123};
|
||||||
123 -> {131 124};
|
|
||||||
|
subgraph cluster_27 {
|
||||||
|
color=red
|
||||||
|
124 [label="Enter function test_7" style="filled" fillcolor=red];
|
||||||
|
125 [label="Access variable R|<local>/x|"];
|
||||||
|
126 [label="Check not null: R|<local>/x|!!"];
|
||||||
|
127 [label="Function call: R|<local>/x|!!.R|/A.foo|()"];
|
||||||
|
128 [label="Exit function test_7" style="filled" fillcolor=red];
|
||||||
|
}
|
||||||
|
|
||||||
124 -> {125};
|
124 -> {125};
|
||||||
125 -> {126};
|
125 -> {126};
|
||||||
126 -> {127};
|
126 -> {127};
|
||||||
127 -> {128};
|
127 -> {128};
|
||||||
128 -> {129};
|
|
||||||
129 -> {130};
|
|
||||||
130 -> {138};
|
|
||||||
131 -> {132};
|
|
||||||
132 -> {133};
|
|
||||||
133 -> {134};
|
|
||||||
134 -> {152};
|
|
||||||
134 -> {135} [style=dotted];
|
|
||||||
135 -> {136} [style=dotted];
|
|
||||||
136 -> {137} [style=dotted];
|
|
||||||
137 -> {138} [style=dotted];
|
|
||||||
138 -> {139};
|
|
||||||
139 -> {140};
|
|
||||||
140 -> {141};
|
|
||||||
141 -> {143 142};
|
|
||||||
142 -> {149};
|
|
||||||
143 -> {144};
|
|
||||||
144 -> {145};
|
|
||||||
145 -> {146};
|
|
||||||
146 -> {147};
|
|
||||||
147 -> {148};
|
|
||||||
148 -> {149};
|
|
||||||
149 -> {150};
|
|
||||||
150 -> {151};
|
|
||||||
151 -> {152};
|
|
||||||
|
|
||||||
subgraph cluster_36 {
|
|
||||||
color=red
|
|
||||||
153 [label="Enter function test_4" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_37 {
|
|
||||||
color=blue
|
|
||||||
154 [label="Enter when"];
|
|
||||||
subgraph cluster_38 {
|
|
||||||
color=blue
|
|
||||||
155 [label="Enter when branch condition "];
|
|
||||||
subgraph cluster_39 {
|
|
||||||
color=blue
|
|
||||||
156 [label="Enter ||"];
|
|
||||||
subgraph cluster_40 {
|
|
||||||
color=blue
|
|
||||||
157 [label="Enter when"];
|
|
||||||
158 [label="Access variable R|<local>/a|"];
|
|
||||||
159 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
|
||||||
subgraph cluster_41 {
|
|
||||||
color=blue
|
|
||||||
160 [label="Enter when branch condition "];
|
|
||||||
161 [label="Const: Null(null)"];
|
|
||||||
162 [label="Operator =="];
|
|
||||||
163 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_42 {
|
|
||||||
color=blue
|
|
||||||
164 [label="Enter when branch condition else"];
|
|
||||||
165 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
166 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_43 {
|
|
||||||
color=blue
|
|
||||||
167 [label="Enter block"];
|
|
||||||
168 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
169 [label="Exit block"];
|
|
||||||
}
|
|
||||||
170 [label="Exit when branch result"];
|
|
||||||
171 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_44 {
|
|
||||||
color=blue
|
|
||||||
172 [label="Enter block"];
|
|
||||||
173 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
174 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
175 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
176 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
177 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
178 [label="Exit when"];
|
|
||||||
}
|
|
||||||
179 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
180 [label="Exit left part of ||"];
|
|
||||||
181 [label="Enter right part of ||"];
|
|
||||||
182 [label="Access variable R|<local>/b|"];
|
|
||||||
183 [label="Exit ||"];
|
|
||||||
}
|
|
||||||
184 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
185 [label="Synthetic else branch"];
|
|
||||||
186 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_45 {
|
|
||||||
color=blue
|
|
||||||
187 [label="Enter block"];
|
|
||||||
188 [label="Access variable R|<local>/a|"];
|
|
||||||
189 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
190 [label="Exit block"];
|
|
||||||
}
|
|
||||||
191 [label="Exit when branch result"];
|
|
||||||
192 [label="Exit when"];
|
|
||||||
}
|
|
||||||
193 [label="Access variable R|<local>/a|"];
|
|
||||||
194 [label="Function call: R|<local>/a|.R|/A.foo|()"];
|
|
||||||
195 [label="Exit function test_4" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
|
|
||||||
153 -> {154};
|
|
||||||
154 -> {155};
|
|
||||||
155 -> {156};
|
|
||||||
156 -> {157};
|
|
||||||
157 -> {158};
|
|
||||||
158 -> {159};
|
|
||||||
159 -> {160};
|
|
||||||
160 -> {161};
|
|
||||||
161 -> {162};
|
|
||||||
162 -> {163};
|
|
||||||
163 -> {171 164};
|
|
||||||
164 -> {165};
|
|
||||||
165 -> {166};
|
|
||||||
166 -> {167};
|
|
||||||
167 -> {168};
|
|
||||||
168 -> {169};
|
|
||||||
169 -> {170};
|
|
||||||
170 -> {178};
|
|
||||||
171 -> {172};
|
|
||||||
172 -> {173};
|
|
||||||
173 -> {174};
|
|
||||||
174 -> {195};
|
|
||||||
174 -> {175} [style=dotted];
|
|
||||||
175 -> {176} [style=dotted];
|
|
||||||
176 -> {177} [style=dotted];
|
|
||||||
177 -> {178} [style=dotted];
|
|
||||||
178 -> {179};
|
|
||||||
179 -> {180};
|
|
||||||
180 -> {183 181};
|
|
||||||
181 -> {182};
|
|
||||||
182 -> {183};
|
|
||||||
183 -> {184};
|
|
||||||
184 -> {186 185};
|
|
||||||
185 -> {192};
|
|
||||||
186 -> {187};
|
|
||||||
187 -> {188};
|
|
||||||
188 -> {189};
|
|
||||||
189 -> {190};
|
|
||||||
190 -> {191};
|
|
||||||
191 -> {192};
|
|
||||||
192 -> {193};
|
|
||||||
193 -> {194};
|
|
||||||
194 -> {195};
|
|
||||||
|
|
||||||
subgraph cluster_46 {
|
|
||||||
color=red
|
|
||||||
196 [label="Enter function test_5" style="filled" fillcolor=red];
|
|
||||||
subgraph cluster_47 {
|
|
||||||
color=blue
|
|
||||||
197 [label="Enter when"];
|
|
||||||
subgraph cluster_48 {
|
|
||||||
color=blue
|
|
||||||
198 [label="Enter when branch condition "];
|
|
||||||
subgraph cluster_49 {
|
|
||||||
color=blue
|
|
||||||
199 [label="Enter ||"];
|
|
||||||
200 [label="Access variable R|<local>/b|"];
|
|
||||||
201 [label="Exit left part of ||"];
|
|
||||||
202 [label="Enter right part of ||"];
|
|
||||||
subgraph cluster_50 {
|
|
||||||
color=blue
|
|
||||||
203 [label="Enter when"];
|
|
||||||
204 [label="Access variable R|<local>/a|"];
|
|
||||||
205 [label="Variable declaration: lval <bangbang>: R|A?|"];
|
|
||||||
subgraph cluster_51 {
|
|
||||||
color=blue
|
|
||||||
206 [label="Enter when branch condition "];
|
|
||||||
207 [label="Const: Null(null)"];
|
|
||||||
208 [label="Operator =="];
|
|
||||||
209 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
subgraph cluster_52 {
|
|
||||||
color=blue
|
|
||||||
210 [label="Enter when branch condition else"];
|
|
||||||
211 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
212 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_53 {
|
|
||||||
color=blue
|
|
||||||
213 [label="Enter block"];
|
|
||||||
214 [label="Access variable R|<local>/<bangbang>|"];
|
|
||||||
215 [label="Exit block"];
|
|
||||||
}
|
|
||||||
216 [label="Exit when branch result"];
|
|
||||||
217 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_54 {
|
|
||||||
color=blue
|
|
||||||
218 [label="Enter block"];
|
|
||||||
219 [label="Function call: R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
220 [label="Throw: throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()"];
|
|
||||||
221 [label="Stub" style="filled" fillcolor=gray];
|
|
||||||
222 [label="Exit block" style="filled" fillcolor=gray];
|
|
||||||
}
|
|
||||||
223 [label="Exit when branch result" style="filled" fillcolor=gray];
|
|
||||||
224 [label="Exit when"];
|
|
||||||
}
|
|
||||||
225 [label="Function call: when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()"];
|
|
||||||
226 [label="Exit ||"];
|
|
||||||
}
|
|
||||||
227 [label="Exit when branch condition"];
|
|
||||||
}
|
|
||||||
228 [label="Synthetic else branch"];
|
|
||||||
229 [label="Enter when branch result"];
|
|
||||||
subgraph cluster_55 {
|
|
||||||
color=blue
|
|
||||||
230 [label="Enter block"];
|
|
||||||
231 [label="Access variable R|<local>/a|"];
|
|
||||||
232 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
|
||||||
233 [label="Exit block"];
|
|
||||||
}
|
|
||||||
234 [label="Exit when branch result"];
|
|
||||||
235 [label="Exit when"];
|
|
||||||
}
|
|
||||||
236 [label="Access variable R|<local>/a|"];
|
|
||||||
237 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
|
|
||||||
238 [label="Exit function test_5" style="filled" fillcolor=red];
|
|
||||||
}
|
|
||||||
|
|
||||||
196 -> {197};
|
|
||||||
197 -> {198};
|
|
||||||
198 -> {199};
|
|
||||||
199 -> {200};
|
|
||||||
200 -> {201};
|
|
||||||
201 -> {226 202};
|
|
||||||
202 -> {203};
|
|
||||||
203 -> {204};
|
|
||||||
204 -> {205};
|
|
||||||
205 -> {206};
|
|
||||||
206 -> {207};
|
|
||||||
207 -> {208};
|
|
||||||
208 -> {209};
|
|
||||||
209 -> {217 210};
|
|
||||||
210 -> {211};
|
|
||||||
211 -> {212};
|
|
||||||
212 -> {213};
|
|
||||||
213 -> {214};
|
|
||||||
214 -> {215};
|
|
||||||
215 -> {216};
|
|
||||||
216 -> {224};
|
|
||||||
217 -> {218};
|
|
||||||
218 -> {219};
|
|
||||||
219 -> {220};
|
|
||||||
220 -> {238};
|
|
||||||
220 -> {221} [style=dotted];
|
|
||||||
221 -> {222} [style=dotted];
|
|
||||||
222 -> {223} [style=dotted];
|
|
||||||
223 -> {224} [style=dotted];
|
|
||||||
224 -> {225};
|
|
||||||
225 -> {226};
|
|
||||||
226 -> {227};
|
|
||||||
227 -> {229 228};
|
|
||||||
228 -> {235};
|
|
||||||
229 -> {230};
|
|
||||||
230 -> {231};
|
|
||||||
231 -> {232};
|
|
||||||
232 -> {233};
|
|
||||||
233 -> {234};
|
|
||||||
234 -> {235};
|
|
||||||
235 -> {236};
|
|
||||||
236 -> {237};
|
|
||||||
237 -> {238};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,4 +40,12 @@ fun test_5(a: A?, b: Boolean) {
|
|||||||
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
|
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
|
||||||
}
|
}
|
||||||
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
|
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <X : A?> test_6(x: X) {
|
||||||
|
x!!.foo()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <X : A> test_7(x: X?) {
|
||||||
|
x!!.foo()
|
||||||
}
|
}
|
||||||
+12
-54
@@ -4,28 +4,12 @@ FILE: bangbang.kt
|
|||||||
|
|
||||||
}
|
}
|
||||||
public final fun test_0(a: R|A?|): R|kotlin/Unit| {
|
public final fun test_0(a: R|A?|): R|kotlin/Unit| {
|
||||||
when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/a|!!.R|/A.foo|()
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|()
|
|
||||||
R|<local>/a|.R|/A.foo|()
|
R|<local>/a|.R|/A.foo|()
|
||||||
}
|
}
|
||||||
public final fun test_1(a: R|A?|): R|kotlin/Unit| {
|
public final fun test_1(a: R|A?|): R|kotlin/Unit| {
|
||||||
when () {
|
when () {
|
||||||
when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/a|!!.R|/A.foo|() -> {
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|() -> {
|
|
||||||
R|<local>/a|.R|/A.foo|()
|
R|<local>/a|.R|/A.foo|()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,15 +18,7 @@ FILE: bangbang.kt
|
|||||||
}
|
}
|
||||||
public final fun test_2(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
public final fun test_2(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||||
when () {
|
when () {
|
||||||
when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/a|!!.R|/A.foo|() && R|<local>/b| -> {
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|() && R|<local>/b| -> {
|
|
||||||
R|<local>/a|.R|/A.foo|()
|
R|<local>/a|.R|/A.foo|()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,15 +27,7 @@ FILE: bangbang.kt
|
|||||||
}
|
}
|
||||||
public final fun test_3(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
public final fun test_3(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||||
when () {
|
when () {
|
||||||
R|<local>/b| && when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/b| && R|<local>/a|!!.R|/A.foo|() -> {
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|() -> {
|
|
||||||
R|<local>/a|.R|/A.foo|()
|
R|<local>/a|.R|/A.foo|()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,15 +36,7 @@ FILE: bangbang.kt
|
|||||||
}
|
}
|
||||||
public final fun test_4(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
public final fun test_4(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||||
when () {
|
when () {
|
||||||
when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/a|!!.R|/A.foo|() || R|<local>/b| -> {
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|() || R|<local>/b| -> {
|
|
||||||
R|<local>/a|.R|/A.foo|()
|
R|<local>/a|.R|/A.foo|()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -85,18 +45,16 @@ FILE: bangbang.kt
|
|||||||
}
|
}
|
||||||
public final fun test_5(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
public final fun test_5(a: R|A?|, b: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||||
when () {
|
when () {
|
||||||
R|<local>/b| || when (lval <bangbang>: R|A?| = R|<local>/a|) {
|
R|<local>/b| || R|<local>/a|!!.R|/A.foo|() -> {
|
||||||
==($subj$, Null(null)) -> {
|
|
||||||
throw R|kotlin/KotlinNullPointerException.KotlinNullPointerException|()
|
|
||||||
}
|
|
||||||
else -> {
|
|
||||||
R|<local>/<bangbang>|
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.R|/A.foo|() -> {
|
|
||||||
R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()
|
R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()
|
R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()
|
||||||
}
|
}
|
||||||
|
public final fun <X : R|A?|> test_6(x: R|X|): R|kotlin/Unit| {
|
||||||
|
R|<local>/x|!!.R|/A.foo|()
|
||||||
|
}
|
||||||
|
public final fun <X : R|A|> test_7(x: R|X?|): R|kotlin/Unit| {
|
||||||
|
R|<local>/x|!!.R|/A.foo|()
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user