File tree Expand file tree Collapse file tree 13 files changed +317
-0
lines changed
analysis/low-level-api-fir
testData/contextCollector/smartCasts
tests-gen/org/jetbrains/kotlin/analysis/low/level/api/fir Expand file tree Collapse file tree 13 files changed +317
-0
lines changed Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.Nothing?
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.Nothing?
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ // WITH_STDLIB
2
+
3
+ fun main () {
4
+ var str: String? = null
5
+ str = " not null"
6
+ println (str)
7
+ < expr> str< / expr> = null
8
+ println (str)
9
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.String
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.Nothing?
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment2.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.Nothing?
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment2.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ // WITH_STDLIB
2
+
3
+ fun main () {
4
+ var str: String? = null
5
+ str = " not null"
6
+ println (str)
7
+ < expr> str = null < / expr>
8
+ println (str)
9
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+ Smart Casts:
21
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
22
+ Types:
23
+ kotlin.String
24
+
25
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignment2.kt
26
+ public final [ResolvedTo(ANNOTATION_ARGUMENTS)] [PartialBodyAnalysisStateKey=4(4/5) #1] fun main(): R|kotlin/Unit| {
27
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
28
+ R|<local>/str| = String(not null)
29
+ R|kotlin/io/println|(R|<local>/str|)
30
+ R|<local>/str| = Null(null)
31
+ println#(str#)
32
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+
21
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignmentClosingBrace.kt
22
+ public final [ResolvedTo(BODY_RESOLVE)] fun main(): R|kotlin/Unit| {
23
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
24
+ R|<local>/str| = String(not null)
25
+ R|kotlin/io/println|(R|<local>/str|)
26
+ R|<local>/str| = Null(null)
27
+ R|kotlin/io/println|(R|<local>/str|)
28
+ }
Original file line number Diff line number Diff line change
1
+ Tower Data Context:
2
+ Element 0
3
+ Scope: FirDefaultStarImportingScope
4
+ Element 1
5
+ Scope: FirExplicitStarImportingScope
6
+ Element 2
7
+ Scope: FirDefaultSimpleImportingScope
8
+ Element 3
9
+ Scope: FirDefaultSimpleImportingScope
10
+ Element 4
11
+ Scope: FirPackageMemberScope
12
+ Element 5
13
+ Scope: FirExplicitSimpleImportingScope
14
+ Element 6
15
+ Scope: FirLocalScope
16
+ Element 7
17
+ Scope: FirLocalScope
18
+ Properties:
19
+ FirLocalPropertySymbol lvar str: R|kotlin/String?|
20
+
21
+ FILE: [ResolvedTo(IMPORTS)] onNullAssignmentClosingBrace.kt
22
+ public final [ResolvedTo(BODY_RESOLVE)] fun main(): R|kotlin/Unit| {
23
+ [ResolvedTo(BODY_RESOLVE)] lvar str: R|kotlin/String?| = Null(null)
24
+ R|<local>/str| = String(not null)
25
+ R|kotlin/io/println|(R|<local>/str|)
26
+ R|<local>/str| = Null(null)
27
+ R|kotlin/io/println|(R|<local>/str|)
28
+ }
You can’t perform that action at this time.
0 commit comments