[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(RAW_FIR)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@JvmInline[Unresolved]() public? final? inline [ResolvedTo(RAW_FIR)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -15,7 +14,6 @@ FILE: [ResolvedTo(RAW_FIR)] functionInValueClass.kt
IMPORTS:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@JvmInline[Unresolved]() public? final? inline [ResolvedTo(RAW_FIR)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -30,7 +28,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
COMPILER_REQUIRED_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@JvmInline[Unresolved]() public? final? inline [ResolvedTo(RAW_FIR)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -45,7 +42,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
COMPANION_GENERATION:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@JvmInline[Unresolved]() public? final? inline [ResolvedTo(RAW_FIR)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -60,7 +56,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
SUPER_TYPES:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@JvmInline[Unresolved]() public? final? inline [ResolvedTo(SUPER_TYPES)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -75,7 +70,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
TYPES:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public? final? inline [ResolvedTo(TYPES)] class Value : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Value] constructor([ResolvedTo(RAW_FIR)] [CorrespondingProperty=/Value.value] value: Int): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -90,7 +84,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
STATUS:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -105,7 +98,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
EXPECT_ACTUAL_MATCHING:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -120,7 +112,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
ARGUMENTS_OF_ANNOTATIONS:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -135,7 +126,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
CONTRACTS:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -151,7 +141,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
IMPLICIT_TYPES_BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -167,7 +156,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
ANNOTATIONS_ARGUMENTS_MAPPING:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -183,7 +171,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
BODY_RESOLVE:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(STATUS)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(STATUS)] [ContainingClassKey=Value] constructor([ResolvedTo(STATUS)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
LAZY_super<R|kotlin/Any|>
@@ -199,7 +186,6 @@ FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
FILE RAW TO BODY:
FILE: [ResolvedTo(IMPORTS)] functionInValueClass.kt
[ResolvedTo(BODY_RESOLVE)] annotations container
@R|kotlin/jvm/JvmInline|[Types]() public final inline [ResolvedTo(BODY_RESOLVE)] [FirValueClassRepresentationKey=InlineClassRepresentation(underlyingPropertyName=value, underlyingType=kotlin/Int)] class Value : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Value] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/Value.value] value: R|kotlin/Int|): R|Value| {
super<R|kotlin/Any|>()