[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,6 +1,5 @@
RAW_FIR:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -19,7 +18,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
IMPORTS:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -38,7 +36,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
COMPILER_REQUIRED_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -57,7 +54,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
COMPANION_GENERATION:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -76,7 +72,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
SUPER_TYPES:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -95,7 +90,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
TYPES:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -114,7 +108,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
STATUS:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -133,7 +126,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
EXPECT_ACTUAL_MATCHING:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -152,7 +144,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
ARGUMENTS_OF_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -171,7 +162,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
CONTRACTS:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -190,7 +180,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
IMPLICIT_TYPES_BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -209,7 +198,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
ANNOTATIONS_ARGUMENTS_MAPPING:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -228,7 +216,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(STATUS)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(STATUS)] s: R|kotlin/String|): R|one/ClassWithParameter| {
LAZY_super<R|kotlin/Any|>
@@ -247,7 +234,6 @@ FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
FILE RAW TO BODY:
FILE: [ResolvedTo(IMPORTS)] localFunctionInsideStringTemplate.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
public open [ResolvedTo(BODY_RESOLVE)] class ClassWithParameter : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=ClassWithParameter] constructor([ResolvedTo(BODY_RESOLVE)] s: R|kotlin/String|): R|one/ClassWithParameter| {
super<R|kotlin/Any|>()