[FIR] Make FirFile.annotationsContainer nullable

Previously, when no file annotations were present, the FIR element
didn't have a source.
By making it nullable, it will only be created when appropriate and the
source will never be null.

#KT-55835
This commit is contained in:
Kirill Rakhman
2023-06-26 15:06:13 +03:00
committed by Space Team
parent 311975f1ed
commit bed6cb7154
334 changed files with 47 additions and 1937 deletions
@@ -1,69 +1,59 @@
RAW_FIR:
FILE: [ResolvedTo(RAW_FIR)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(RAW_FIR)] fun resolveMe([ResolvedTo(RAW_FIR)] param: I): <implicit> { LAZY_BLOCK }
IMPORTS:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(RAW_FIR)] fun resolveMe([ResolvedTo(RAW_FIR)] param: I): <implicit> { LAZY_BLOCK }
COMPILER_REQUIRED_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] fun resolveMe([ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] param: I): <implicit> { LAZY_BLOCK }
COMPANION_GENERATION:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(COMPANION_GENERATION)] fun resolveMe([ResolvedTo(COMPANION_GENERATION)] param: I): <implicit> { LAZY_BLOCK }
SUPER_TYPES:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(SUPER_TYPES)] fun resolveMe([ResolvedTo(SUPER_TYPES)] param: I): <implicit> { LAZY_BLOCK }
TYPES:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public? final? [ResolvedTo(TYPES)] fun resolveMe([ResolvedTo(TYPES)] param: R|I|): <implicit> { LAZY_BLOCK }
STATUS:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(STATUS)] fun resolveMe([ResolvedTo(STATUS)] param: R|I|): <implicit> { LAZY_BLOCK }
EXPECT_ACTUAL_MATCHING:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun resolveMe([ResolvedTo(EXPECT_ACTUAL_MATCHING)] param: R|I|): <implicit> { LAZY_BLOCK }
ARGUMENTS_OF_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun resolveMe([ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] param: R|I|): <implicit> { LAZY_BLOCK }
CONTRACTS:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(CONTRACTS)] fun resolveMe([ResolvedTo(CONTRACTS)] param: R|I|): <implicit> {
@@ -72,7 +62,6 @@ FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
IMPLICIT_TYPES_BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun resolveMe([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] param: R|I|): R|kotlin/Unit| {
@@ -81,7 +70,6 @@ FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
ANNOTATIONS_ARGUMENTS_MAPPING:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] fun resolveMe([ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] param: R|I|): R|kotlin/Unit| {
@@ -90,7 +78,6 @@ FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public? final? [ResolvedTo(RAW_FIR)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe([ResolvedTo(BODY_RESOLVE)] param: R|I|): R|kotlin/Unit| {
@@ -99,7 +86,6 @@ FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
FILE RAW TO BODY:
FILE: [ResolvedTo(IMPORTS)] functionWithParameter.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public abstract [ResolvedTo(BODY_RESOLVE)] interface I : R|kotlin/Any| {
}
public final [ResolvedTo(BODY_RESOLVE)] fun resolveMe([ResolvedTo(BODY_RESOLVE)] param: R|I|): R|kotlin/Unit| {