Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
7a1eb921
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7a1eb921
编写于
3月 16, 2020
作者:
D
Denis Zharkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FIR: Fix resolution for lambda returning resolved qualifier
上级
e1312a75
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
264 addition
and
110 deletion
+264
-110
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt
...g/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt
+4
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt
.../jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt
+6
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
...ins/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
+4
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt
...kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt
+3
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt
...ns/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt
+1
-0
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt
...sformers/body/resolve/FirExpressionsResolveTransformer.kt
+9
-4
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.dot
...ir/resolve/testData/resolve/cfg/lambdaReturningObject.dot
+67
-0
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt
...fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt
+14
-0
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.txt
...ir/resolve/testData/resolve/cfg/lambdaReturningObject.txt
+22
-0
compiler/fir/resolve/testData/resolve/exhaustiveWhenAndDNNType.dot
...fir/resolve/testData/resolve/exhaustiveWhenAndDNNType.dot
+124
-106
compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java
...org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java
+5
-0
compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java
.../kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java
+5
-0
未找到文件。
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt
浏览文件 @
7a1eb921
...
@@ -586,6 +586,10 @@ abstract class FirDataFlowAnalyzer<FLOW : Flow>(
...
@@ -586,6 +586,10 @@ abstract class FirDataFlowAnalyzer<FLOW : Flow>(
exitSafeCall
(
qualifiedAccessExpression
)
exitSafeCall
(
qualifiedAccessExpression
)
}
}
fun
exitResolvedQualifierNode
(
resolvedQualifier
:
FirResolvedQualifier
)
{
graphBuilder
.
exitResolvedQualifierNode
(
resolvedQualifier
).
mergeIncomingFlow
()
}
fun
enterCall
(
functionCall
:
FirCall
)
{
fun
enterCall
(
functionCall
:
FirCall
)
{
graphBuilder
.
enterCall
(
functionCall
)
graphBuilder
.
enterCall
(
functionCall
)
}
}
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraph.kt
浏览文件 @
7a1eb921
...
@@ -202,6 +202,12 @@ class QualifiedAccessNode(
...
@@ -202,6 +202,12 @@ class QualifiedAccessNode(
level
:
Int
,
id
:
Int
level
:
Int
,
id
:
Int
)
:
CFGNode
<
FirQualifiedAccessExpression
>(
owner
,
level
,
id
)
)
:
CFGNode
<
FirQualifiedAccessExpression
>(
owner
,
level
,
id
)
class
ResolvedQualifierNode
(
owner
:
ControlFlowGraph
,
override
val
fir
:
FirResolvedQualifier
,
level
:
Int
,
id
:
Int
)
:
CFGNode
<
FirResolvedQualifier
>(
owner
,
level
,
id
)
class
FunctionCallNode
(
class
FunctionCallNode
(
owner
:
ControlFlowGraph
,
owner
:
ControlFlowGraph
,
override
val
fir
:
FirFunctionCall
,
override
val
fir
:
FirFunctionCall
,
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphBuilder.kt
浏览文件 @
7a1eb921
...
@@ -621,6 +621,10 @@ class ControlFlowGraphBuilder {
...
@@ -621,6 +621,10 @@ class ControlFlowGraphBuilder {
return
node
return
node
}
}
fun
exitResolvedQualifierNode
(
resolvedQualifier
:
FirResolvedQualifier
):
ResolvedQualifierNode
{
return
createResolvedQualifierNode
(
resolvedQualifier
).
also
(
this
::
addNewSimpleNode
)
}
fun
enterCall
(
call
:
FirCall
)
{
fun
enterCall
(
call
:
FirCall
)
{
levelCounter
++
levelCounter
++
}
}
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphNodeBuilder.kt
浏览文件 @
7a1eb921
...
@@ -39,6 +39,9 @@ fun ControlFlowGraphBuilder.createCheckNotNullCallNode(fir: FirCheckNotNullCall)
...
@@ -39,6 +39,9 @@ fun ControlFlowGraphBuilder.createCheckNotNullCallNode(fir: FirCheckNotNullCall)
fun
ControlFlowGraphBuilder
.
createQualifiedAccessNode
(
fir
:
FirQualifiedAccessExpression
):
QualifiedAccessNode
=
fun
ControlFlowGraphBuilder
.
createQualifiedAccessNode
(
fir
:
FirQualifiedAccessExpression
):
QualifiedAccessNode
=
QualifiedAccessNode
(
graph
,
fir
,
levelCounter
,
createId
())
QualifiedAccessNode
(
graph
,
fir
,
levelCounter
,
createId
())
fun
ControlFlowGraphBuilder
.
createResolvedQualifierNode
(
fir
:
FirResolvedQualifier
):
ResolvedQualifierNode
=
ResolvedQualifierNode
(
graph
,
fir
,
levelCounter
,
createId
())
fun
ControlFlowGraphBuilder
.
createBlockEnterNode
(
fir
:
FirBlock
):
BlockEnterNode
=
BlockEnterNode
(
graph
,
fir
,
levelCounter
,
createId
())
fun
ControlFlowGraphBuilder
.
createBlockEnterNode
(
fir
:
FirBlock
):
BlockEnterNode
=
BlockEnterNode
(
graph
,
fir
,
levelCounter
,
createId
())
fun
ControlFlowGraphBuilder
.
createBlockExitNode
(
fir
:
FirBlock
):
BlockExitNode
=
BlockExitNode
(
graph
,
fir
,
levelCounter
,
createId
())
fun
ControlFlowGraphBuilder
.
createBlockExitNode
(
fir
:
FirBlock
):
BlockExitNode
=
BlockExitNode
(
graph
,
fir
,
levelCounter
,
createId
())
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/cfg/ControlFlowGraphRenderer.kt
浏览文件 @
7a1eb921
...
@@ -166,6 +166,7 @@ private fun CFGNode<*>.render(): String =
...
@@ -166,6 +166,7 @@ private fun CFGNode<*>.render(): String =
is
LoopExitNode
->
"Exit ${fir.type()}loop"
is
LoopExitNode
->
"Exit ${fir.type()}loop"
is
QualifiedAccessNode
->
"Access variable ${fir.calleeReference.render(CfgRenderMode)}"
is
QualifiedAccessNode
->
"Access variable ${fir.calleeReference.render(CfgRenderMode)}"
is
ResolvedQualifierNode
->
"Access qualifier ${fir.classId}"
is
OperatorCallNode
->
"Operator ${fir.operation.operator}"
is
OperatorCallNode
->
"Operator ${fir.operation.operator}"
is
ComparisonExpressionNode
->
"Comparison ${fir.operation.operator}"
is
ComparisonExpressionNode
->
"Comparison ${fir.operation.operator}"
is
TypeOperatorCallNode
->
"Type operator: \"${fir.render(CfgRenderMode)}\""
is
TypeOperatorCallNode
->
"Type operator: \"${fir.render(CfgRenderMode)}\""
...
...
compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt
浏览文件 @
7a1eb921
...
@@ -137,10 +137,15 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
...
@@ -137,10 +137,15 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
}
}
}
}
}
}
if
(
result
is
FirQualifiedAccessExpression
)
{
when
(
result
)
{
dataFlowAnalyzer
.
enterQualifiedAccessExpression
(
result
)
is
FirQualifiedAccessExpression
->
{
result
=
components
.
transformQualifiedAccessUsingSmartcastInfo
(
result
)
dataFlowAnalyzer
.
enterQualifiedAccessExpression
(
result
)
dataFlowAnalyzer
.
exitQualifiedAccessExpression
(
result
)
result
=
components
.
transformQualifiedAccessUsingSmartcastInfo
(
result
)
dataFlowAnalyzer
.
exitQualifiedAccessExpression
(
result
)
}
is
FirResolvedQualifier
->
{
dataFlowAnalyzer
.
exitResolvedQualifierNode
(
result
)
}
}
}
return
result
.
compose
()
return
result
.
compose
()
}
}
...
...
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.dot
0 → 100644
浏览文件 @
7a1eb921
digraph
lambdaReturningObject_kt
{
graph
[
nodesep
=
3
]
node
[
shape
=
box
penwidth
=
2
]
edge
[
penwidth
=
2
]
subgraph
cluster_0
{
color
=
red
0
[
label
=
"Enter function bar"
style
=
"filled"
fillcolor
=
red
]
;
1
[
label
=
"Exit function bar"
style
=
"filled"
fillcolor
=
red
]
;
}
0
->
{
1
};
subgraph
cluster_1
{
color
=
red
2
[
label
=
"Enter function <init>"
style
=
"filled"
fillcolor
=
red
]
;
3
[
label
=
"Delegated constructor call: super<R|kotlin/Any|>()"
]
;
4
[
label
=
"Exit function <init>"
style
=
"filled"
fillcolor
=
red
]
;
}
2
->
{
3
};
3
->
{
4
};
subgraph
cluster_2
{
color
=
red
5
[
label
=
"Enter function MyOut"
style
=
"filled"
fillcolor
=
red
]
;
6
[
label
=
"Function call: R|kotlin/TODO|()"
]
;
7
[
label
=
"Stub"
style
=
"filled"
fillcolor
=
gray
]
;
8
[
label
=
"Jump: ^MyOut R|kotlin/TODO|()"
style
=
"filled"
fillcolor
=
gray
]
;
9
[
label
=
"Stub"
style
=
"filled"
fillcolor
=
gray
]
;
10
[
label
=
"Exit function MyOut"
style
=
"filled"
fillcolor
=
red
]
;
}
5
->
{
6
};
6
->
{
10
};
6
->
{
7
}
[
style
=
dotted
]
;
7
->
{
8
}
[
style
=
dotted
]
;
8
->
{
10
9
}
[
style
=
dotted
]
;
9
->
{
10
}
[
style
=
dotted
]
;
subgraph
cluster_3
{
color
=
red
11
[
label
=
"Enter function foo"
style
=
"filled"
fillcolor
=
red
]
;
12
[
label
=
"Postponed enter to lambda"
]
;
13
[
label
=
"Postponed exit from lambda"
]
;
14
[
label
=
"Function call: R|/MyOut|<R|IrStarProjectionImpl|>(...)"
]
;
15
[
label
=
"Function call: R|/bar|(...)"
]
;
16
[
label
=
"Exit function foo"
style
=
"filled"
fillcolor
=
red
]
;
}
11
->
{
12
};
12
->
{
13
13
}
[
color
=
green
]
;
13
->
{
14
};
14
->
{
15
};
15
->
{
16
};
subgraph
cluster_4
{
color
=
red
17
[
label
=
"Enter function anonymousFunction"
style
=
"filled"
fillcolor
=
red
]
;
18
[
label
=
"Access qualifier /IrStarProjectionImpl"
]
;
19
[
label
=
"Exit function anonymousFunction"
style
=
"filled"
fillcolor
=
red
]
;
}
17
->
{
18
};
18
->
{
19
};
}
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt
0 → 100644
浏览文件 @
7a1eb921
// !DUMP_CFG
interface
Out
<
out
E
>
fun
bar
(
arguments
:
Out
<
IrTypeArgument
>)
{}
interface
IrTypeArgument
object
IrStarProjectionImpl
:
IrTypeArgument
fun
<
T
>
MyOut
(
init
:
()
->
T
):
Out
<
T
>
=
TODO
()
fun
foo
()
{
bar
(
MyOut
{
IrStarProjectionImpl
})
}
compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.txt
0 → 100644
浏览文件 @
7a1eb921
FILE: lambdaReturningObject.kt
public abstract interface Out<out E> : R|kotlin/Any| {
}
public final fun bar(arguments: R|Out<IrTypeArgument>|): R|kotlin/Unit| {
}
public abstract interface IrTypeArgument : R|kotlin/Any| {
}
public final object IrStarProjectionImpl : R|IrTypeArgument| {
private constructor(): R|IrStarProjectionImpl| {
super<R|kotlin/Any|>()
}
}
public final fun <T> MyOut(init: R|() -> T|): R|Out<T>| {
^MyOut R|kotlin/TODO|()
}
public final fun foo(): R|kotlin/Unit| {
R|/bar|(R|/MyOut|<R|IrStarProjectionImpl|>(<L> = MyOut@fun <anonymous>(): R|IrStarProjectionImpl| {
^ Q|IrStarProjectionImpl|
}
))
}
compiler/fir/resolve/testData/resolve/exhaustiveWhenAndDNNType.dot
浏览文件 @
7a1eb921
...
@@ -50,49 +50,52 @@ digraph exhaustiveWhenAndDNNType_kt {
...
@@ -50,49 +50,52 @@ digraph exhaustiveWhenAndDNNType_kt {
subgraph
cluster_5
{
subgraph
cluster_5
{
color
=
red
color
=
red
12
[
label
=
"Enter function test_1"
style
=
"filled"
fillcolor
=
red
]
;
12
[
label
=
"Enter function test_1"
style
=
"filled"
fillcolor
=
red
]
;
13
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
13
[
label
=
"Access qualifier /SomeEnum"
]
;
14
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
14
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
15
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
subgraph
cluster_6
{
subgraph
cluster_6
{
color
=
blue
color
=
blue
1
5
[
label
=
"Enter when"
]
;
1
6
[
label
=
"Enter when"
]
;
1
6
[
label
=
"Access variable R|<local>/flag|"
]
;
1
7
[
label
=
"Access variable R|<local>/flag|"
]
;
1
7
[
label
=
"Check not null: R|<local>/flag|!!"
]
;
1
8
[
label
=
"Check not null: R|<local>/flag|!!"
]
;
subgraph
cluster_7
{
subgraph
cluster_7
{
color
=
blue
color
=
blue
18
[
label
=
"Enter when branch condition "
]
;
19
[
label
=
"Enter when branch condition "
]
;
19
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
20
[
label
=
"Access qualifier /SomeEnum"
]
;
20
[
label
=
"Operator =="
]
;
21
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
21
[
label
=
"Exit when branch condition"
]
;
22
[
label
=
"Operator =="
]
;
23
[
label
=
"Exit when branch condition"
]
;
}
}
subgraph
cluster_8
{
subgraph
cluster_8
{
color
=
blue
color
=
blue
22
[
label
=
"Enter when branch condition "
]
;
24
[
label
=
"Enter when branch condition "
]
;
23
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
25
[
label
=
"Access qualifier /SomeEnum"
]
;
24
[
label
=
"Operator =="
]
;
26
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
25
[
label
=
"Exit when branch condition"
]
;
27
[
label
=
"Operator =="
]
;
28
[
label
=
"Exit when branch condition"
]
;
}
}
2
6
[
label
=
"Enter when branch result"
]
;
2
9
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_9
{
subgraph
cluster_9
{
color
=
blue
color
=
blue
27
[
label
=
"Enter block"
]
;
30
[
label
=
"Enter block"
]
;
28
[
label
=
"Function call: R|/B.B|()"
]
;
31
[
label
=
"Function call: R|/B.B|()"
]
;
29
[
label
=
"Exit block"
]
;
32
[
label
=
"Exit block"
]
;
}
}
3
0
[
label
=
"Exit when branch result"
]
;
3
3
[
label
=
"Exit when branch result"
]
;
3
1
[
label
=
"Enter when branch result"
]
;
3
4
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_10
{
subgraph
cluster_10
{
color
=
blue
color
=
blue
3
2
[
label
=
"Enter block"
]
;
3
5
[
label
=
"Enter block"
]
;
3
3
[
label
=
"Function call: R|/B.B|()"
]
;
3
6
[
label
=
"Function call: R|/B.B|()"
]
;
3
4
[
label
=
"Exit block"
]
;
3
7
[
label
=
"Exit block"
]
;
}
}
3
5
[
label
=
"Exit when branch result"
]
;
3
8
[
label
=
"Exit when branch result"
]
;
3
6
[
label
=
"Exit when"
]
;
3
9
[
label
=
"Exit when"
]
;
}
}
37
[
label
=
"Variable declaration: lval b: R|B|"
]
;
40
[
label
=
"Variable declaration: lval b: R|B|"
]
;
38
[
label
=
"Access variable R|<local>/b|"
]
;
41
[
label
=
"Access variable R|<local>/b|"
]
;
39
[
label
=
"Function call: R|/takeB|(...)"
]
;
42
[
label
=
"Function call: R|/takeB|(...)"
]
;
4
0
[
label
=
"Exit function test_1"
style
=
"filled"
fillcolor
=
red
]
;
4
3
[
label
=
"Exit function test_1"
style
=
"filled"
fillcolor
=
red
]
;
}
}
12
->
{
13
};
12
->
{
13
};
...
@@ -104,159 +107,165 @@ digraph exhaustiveWhenAndDNNType_kt {
...
@@ -104,159 +107,165 @@ digraph exhaustiveWhenAndDNNType_kt {
18
->
{
19
};
18
->
{
19
};
19
->
{
20
};
19
->
{
20
};
20
->
{
21
};
20
->
{
21
};
21
->
{
31
22
};
21
->
{
22
};
22
->
{
23
};
22
->
{
23
};
23
->
{
24
};
23
->
{
34
24
};
24
->
{
25
};
24
->
{
25
};
25
->
{
26
};
25
->
{
26
};
26
->
{
27
};
26
->
{
27
};
27
->
{
28
};
27
->
{
28
};
28
->
{
29
};
28
->
{
29
};
29
->
{
30
};
29
->
{
30
};
30
->
{
3
6
};
30
->
{
3
1
};
31
->
{
32
};
31
->
{
32
};
32
->
{
33
};
32
->
{
33
};
33
->
{
3
4
};
33
->
{
3
9
};
34
->
{
35
};
34
->
{
35
};
35
->
{
36
};
35
->
{
36
};
36
->
{
37
};
36
->
{
37
};
37
->
{
38
};
37
->
{
38
};
38
->
{
39
};
38
->
{
39
};
39
->
{
40
};
39
->
{
40
};
40
->
{
41
};
41
->
{
42
};
42
->
{
43
};
subgraph
cluster_11
{
subgraph
cluster_11
{
color
=
red
color
=
red
41
[
label
=
"Enter function test_2"
style
=
"filled"
fillcolor
=
red
]
;
44
[
label
=
"Enter function test_2"
style
=
"filled"
fillcolor
=
red
]
;
42
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
45
[
label
=
"Access qualifier /SomeEnum"
]
;
43
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
46
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
47
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
subgraph
cluster_12
{
subgraph
cluster_12
{
color
=
blue
color
=
blue
4
4
[
label
=
"Enter when"
]
;
4
8
[
label
=
"Enter when"
]
;
4
5
[
label
=
"Access variable R|<local>/flag|"
]
;
4
9
[
label
=
"Access variable R|<local>/flag|"
]
;
46
[
label
=
"Check not null: R|<local>/flag|!!"
]
;
50
[
label
=
"Check not null: R|<local>/flag|!!"
]
;
subgraph
cluster_13
{
subgraph
cluster_13
{
color
=
blue
color
=
blue
47
[
label
=
"Enter when branch condition "
]
;
51
[
label
=
"Enter when branch condition "
]
;
48
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
52
[
label
=
"Access qualifier /SomeEnum"
]
;
49
[
label
=
"Operator =="
]
;
53
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
50
[
label
=
"Exit when branch condition"
]
;
54
[
label
=
"Operator =="
]
;
55
[
label
=
"Exit when branch condition"
]
;
}
}
subgraph
cluster_14
{
subgraph
cluster_14
{
color
=
blue
color
=
blue
51
[
label
=
"Enter when branch condition "
]
;
56
[
label
=
"Enter when branch condition "
]
;
52
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
57
[
label
=
"Access qualifier /SomeEnum"
]
;
53
[
label
=
"Operator =="
]
;
58
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
54
[
label
=
"Exit when branch condition"
]
;
59
[
label
=
"Operator =="
]
;
60
[
label
=
"Exit when branch condition"
]
;
}
}
55
[
label
=
"Enter when branch result"
]
;
61
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_15
{
subgraph
cluster_15
{
color
=
blue
color
=
blue
56
[
label
=
"Enter block"
]
;
62
[
label
=
"Enter block"
]
;
57
[
label
=
"Function call: R|/B.B|()"
]
;
63
[
label
=
"Function call: R|/B.B|()"
]
;
58
[
label
=
"Exit block"
]
;
64
[
label
=
"Exit block"
]
;
}
}
59
[
label
=
"Exit when branch result"
]
;
65
[
label
=
"Exit when branch result"
]
;
6
0
[
label
=
"Enter when branch result"
]
;
6
6
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_16
{
subgraph
cluster_16
{
color
=
blue
color
=
blue
6
1
[
label
=
"Enter block"
]
;
6
7
[
label
=
"Enter block"
]
;
6
2
[
label
=
"Function call: R|/B.B|()"
]
;
6
8
[
label
=
"Function call: R|/B.B|()"
]
;
6
3
[
label
=
"Exit block"
]
;
6
9
[
label
=
"Exit block"
]
;
}
}
64
[
label
=
"Exit when branch result"
]
;
70
[
label
=
"Exit when branch result"
]
;
65
[
label
=
"Exit when"
]
;
71
[
label
=
"Exit when"
]
;
}
}
66
[
label
=
"Variable declaration: lval b: R|B|"
]
;
72
[
label
=
"Variable declaration: lval b: R|B|"
]
;
67
[
label
=
"Access variable R|<local>/b|"
]
;
73
[
label
=
"Access variable R|<local>/b|"
]
;
68
[
label
=
"Function call: R|/takeB|(...)"
]
;
74
[
label
=
"Function call: R|/takeB|(...)"
]
;
69
[
label
=
"Exit function test_2"
style
=
"filled"
fillcolor
=
red
]
;
75
[
label
=
"Exit function test_2"
style
=
"filled"
fillcolor
=
red
]
;
}
}
41
->
{
42
};
42
->
{
43
};
43
->
{
44
};
44
->
{
45
};
44
->
{
45
};
45
->
{
46
};
45
->
{
46
};
46
->
{
47
};
46
->
{
47
};
47
->
{
48
};
47
->
{
48
};
48
->
{
49
};
48
->
{
49
};
49
->
{
50
};
49
->
{
50
};
50
->
{
60
51
};
50
->
{
51
};
51
->
{
52
};
51
->
{
52
};
52
->
{
53
};
52
->
{
53
};
53
->
{
54
};
53
->
{
54
};
54
->
{
55
};
54
->
{
55
};
55
->
{
56
};
55
->
{
66
56
};
56
->
{
57
};
56
->
{
57
};
57
->
{
58
};
57
->
{
58
};
58
->
{
59
};
58
->
{
59
};
59
->
{
6
5
};
59
->
{
6
0
};
60
->
{
61
};
60
->
{
61
};
61
->
{
62
};
61
->
{
62
};
62
->
{
63
};
62
->
{
63
};
63
->
{
64
};
63
->
{
64
};
64
->
{
65
};
64
->
{
65
};
65
->
{
66
};
65
->
{
71
};
66
->
{
67
};
66
->
{
67
};
67
->
{
68
};
67
->
{
68
};
68
->
{
69
};
68
->
{
69
};
69
->
{
70
};
70
->
{
71
};
71
->
{
72
};
72
->
{
73
};
73
->
{
74
};
74
->
{
75
};
subgraph
cluster_17
{
subgraph
cluster_17
{
color
=
red
color
=
red
70
[
label
=
"Enter function test_3"
style
=
"filled"
fillcolor
=
red
]
;
76
[
label
=
"Enter function test_3"
style
=
"filled"
fillcolor
=
red
]
;
71
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
77
[
label
=
"Access qualifier /SomeEnum"
]
;
72
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
78
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
79
[
label
=
"Variable declaration: lval flag: R|SomeEnum|"
]
;
subgraph
cluster_18
{
subgraph
cluster_18
{
color
=
blue
color
=
blue
73
[
label
=
"Enter when"
]
;
80
[
label
=
"Enter when"
]
;
74
[
label
=
"Access variable R|<local>/flag|"
]
;
81
[
label
=
"Access variable R|<local>/flag|"
]
;
subgraph
cluster_19
{
subgraph
cluster_19
{
color
=
blue
color
=
blue
75
[
label
=
"Enter when branch condition "
]
;
82
[
label
=
"Enter when branch condition "
]
;
76
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
83
[
label
=
"Access qualifier /SomeEnum"
]
;
77
[
label
=
"Operator =="
]
;
84
[
label
=
"Access variable R|/SomeEnum.A1|"
]
;
78
[
label
=
"Exit when branch condition"
]
;
85
[
label
=
"Operator =="
]
;
86
[
label
=
"Exit when branch condition"
]
;
}
}
subgraph
cluster_20
{
subgraph
cluster_20
{
color
=
blue
color
=
blue
79
[
label
=
"Enter when branch condition "
]
;
87
[
label
=
"Enter when branch condition "
]
;
80
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
88
[
label
=
"Access qualifier /SomeEnum"
]
;
81
[
label
=
"Operator =="
]
;
89
[
label
=
"Access variable R|/SomeEnum.A2|"
]
;
82
[
label
=
"Exit when branch condition"
]
;
90
[
label
=
"Operator =="
]
;
91
[
label
=
"Exit when branch condition"
]
;
}
}
83
[
label
=
"Enter when branch result"
]
;
92
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_21
{
subgraph
cluster_21
{
color
=
blue
color
=
blue
84
[
label
=
"Enter block"
]
;
93
[
label
=
"Enter block"
]
;
85
[
label
=
"Function call: R|/B.B|()"
]
;
94
[
label
=
"Function call: R|/B.B|()"
]
;
86
[
label
=
"Exit block"
]
;
95
[
label
=
"Exit block"
]
;
}
}
87
[
label
=
"Exit when branch result"
]
;
96
[
label
=
"Exit when branch result"
]
;
88
[
label
=
"Enter when branch result"
]
;
97
[
label
=
"Enter when branch result"
]
;
subgraph
cluster_22
{
subgraph
cluster_22
{
color
=
blue
color
=
blue
89
[
label
=
"Enter block"
]
;
98
[
label
=
"Enter block"
]
;
9
0
[
label
=
"Function call: R|/B.B|()"
]
;
9
9
[
label
=
"Function call: R|/B.B|()"
]
;
91
[
label
=
"Exit block"
]
;
100
[
label
=
"Exit block"
]
;
}
}
92
[
label
=
"Exit when branch result"
]
;
101
[
label
=
"Exit when branch result"
]
;
93
[
label
=
"Exit when"
]
;
102
[
label
=
"Exit when"
]
;
}
}
94
[
label
=
"Variable declaration: lval b: R|B|"
]
;
103
[
label
=
"Variable declaration: lval b: R|B|"
]
;
95
[
label
=
"Access variable R|<local>/b|"
]
;
104
[
label
=
"Access variable R|<local>/b|"
]
;
96
[
label
=
"Function call: R|/takeB|(...)"
]
;
105
[
label
=
"Function call: R|/takeB|(...)"
]
;
97
[
label
=
"Exit function test_3"
style
=
"filled"
fillcolor
=
red
]
;
106
[
label
=
"Exit function test_3"
style
=
"filled"
fillcolor
=
red
]
;
}
}
70
->
{
71
};
71
->
{
72
};
72
->
{
73
};
73
->
{
74
};
74
->
{
75
};
75
->
{
76
};
76
->
{
77
};
76
->
{
77
};
77
->
{
78
};
77
->
{
78
};
78
->
{
88
79
};
78
->
{
79
};
79
->
{
80
};
79
->
{
80
};
80
->
{
81
};
80
->
{
81
};
81
->
{
82
};
81
->
{
82
};
...
@@ -264,8 +273,8 @@ digraph exhaustiveWhenAndDNNType_kt {
...
@@ -264,8 +273,8 @@ digraph exhaustiveWhenAndDNNType_kt {
83
->
{
84
};
83
->
{
84
};
84
->
{
85
};
84
->
{
85
};
85
->
{
86
};
85
->
{
86
};
86
->
{
87
};
86
->
{
97
87
};
87
->
{
93
};
87
->
{
88
};
88
->
{
89
};
88
->
{
89
};
89
->
{
90
};
89
->
{
90
};
90
->
{
91
};
90
->
{
91
};
...
@@ -274,6 +283,15 @@ digraph exhaustiveWhenAndDNNType_kt {
...
@@ -274,6 +283,15 @@ digraph exhaustiveWhenAndDNNType_kt {
93
->
{
94
};
93
->
{
94
};
94
->
{
95
};
94
->
{
95
};
95
->
{
96
};
95
->
{
96
};
96
->
{
97
};
96
->
{
102
};
97
->
{
98
};
98
->
{
99
};
99
->
{
100
};
100
->
{
101
};
101
->
{
102
};
102
->
{
103
};
103
->
{
104
};
104
->
{
105
};
105
->
{
106
};
}
}
compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java
浏览文件 @
7a1eb921
...
@@ -606,6 +606,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
...
@@ -606,6 +606,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt"
);
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt"
);
}
}
@TestMetadata
(
"lambdaReturningObject.kt"
)
public
void
testLambdaReturningObject
()
throws
Exception
{
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt"
);
}
@TestMetadata
(
"lambdas.kt"
)
@TestMetadata
(
"lambdas.kt"
)
public
void
testLambdas
()
throws
Exception
{
public
void
testLambdas
()
throws
Exception
{
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdas.kt"
);
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdas.kt"
);
...
...
compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java
浏览文件 @
7a1eb921
...
@@ -606,6 +606,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
...
@@ -606,6 +606,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt"
);
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaAsReturnOfLambda.kt"
);
}
}
@TestMetadata
(
"lambdaReturningObject.kt"
)
public
void
testLambdaReturningObject
()
throws
Exception
{
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdaReturningObject.kt"
);
}
@TestMetadata
(
"lambdas.kt"
)
@TestMetadata
(
"lambdas.kt"
)
public
void
testLambdas
()
throws
Exception
{
public
void
testLambdas
()
throws
Exception
{
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdas.kt"
);
runTest
(
"compiler/fir/resolve/testData/resolve/cfg/lambdas.kt"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录