diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.kt b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.kt new file mode 100644 index 00000000000..ec44e11b132 --- /dev/null +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.kt @@ -0,0 +1,8 @@ +object Some { + @Target(AnnotationTarget.CLASS) + annotation class Ann + + enum class AnnotationTarget { + CLASS + } +} diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.txt new file mode 100644 index 00000000000..08899b0dfcd --- /dev/null +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.txt @@ -0,0 +1,485 @@ +RAW_FIR: +FILE: [ResolvedTo(RAW_FIR)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @Target[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +IMPORTS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @Target[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +COMPILER_REQUIRED_ANNOTATIONS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +COMPANION_GENERATION: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public? final? [ResolvedTo(COMPANION_GENERATION)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +SUPER_TYPES: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(SUPER_TYPES)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public? final? [ResolvedTo(SUPER_TYPES)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +TYPES: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public? final? [ResolvedTo(TYPES)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public? final? [ResolvedTo(TYPES)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +STATUS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +EXPECT_ACTUAL_MATCHING: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.CLASS|) public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? [ResolvedTo(RAW_FIR)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(RAW_FIR)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(RAW_FIR)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(RAW_FIR)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +ARGUMENTS_OF_ANNOTATIONS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final [ResolvedTo(STATUS)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +CONTRACTS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(CONTRACTS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final [ResolvedTo(STATUS)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +IMPLICIT_TYPES_BODY_RESOLVE: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final [ResolvedTo(STATUS)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +ANNOTATIONS_ARGUMENTS_MAPPING: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final [ResolvedTo(STATUS)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +BODY_RESOLVE: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + super() + } + + } + + public final [ResolvedTo(STATUS)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + LAZY_super|> + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(STATUS)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(STATUS)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(STATUS)] get(): R|kotlin/enums/EnumEntries| + + } + + } + +FILE RAW TO BODY: +FILE: [ResolvedTo(BODY_RESOLVE)] compilerRequiredAnnotationConflict.kt + public final [ResolvedTo(BODY_RESOLVE)] object Some : R|kotlin/Any| { + private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Some] constructor(): R|Some| { + super() + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = Q|Some.AnnotationTarget|.< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.CLASS + - compiler arguments stage: FirEnumEntrySymbol /Some.AnnotationTarget.CLASS + >#) public final [ResolvedTo(BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + super() + } + + } + + public final [ResolvedTo(BODY_RESOLVE)] enum class AnnotationTarget : R|kotlin/Enum| { + private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=AnnotationTarget] constructor(): R|Some.AnnotationTarget| { + super|>() + } + + public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=AnnotationTarget] enum entry CLASS: R|Some.AnnotationTarget| + public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=AnnotationTarget] fun values(): R|kotlin/Array| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=AnnotationTarget] fun valueOf([ResolvedTo(BODY_RESOLVE)] value: R|kotlin/String|): R|Some.AnnotationTarget| { + } + + public final static [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=AnnotationTarget] val entries: R|kotlin/enums/EnumEntries| + public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/enums/EnumEntries| + + } + + } diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.kt b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.kt new file mode 100644 index 00000000000..61722f2380e --- /dev/null +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.kt @@ -0,0 +1,8 @@ +import kotlin.annotation.AnnotationTarget.FIELD + +object Some { + @Target(FIELD) + annotation class Ann + + const val FIELD = "" +} diff --git a/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.txt b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.txt new file mode 100644 index 00000000000..a07873ddb76 --- /dev/null +++ b/analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.txt @@ -0,0 +1,289 @@ +RAW_FIR: +FILE: [ResolvedTo(RAW_FIR)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @Target[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +IMPORTS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @Target[Unresolved](LAZY_EXPRESSION) public? final? [ResolvedTo(RAW_FIR)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +COMPILER_REQUIRED_ANNOTATIONS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](R|kotlin/annotation/AnnotationTarget.FIELD|) public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +COMPANION_GENERATION: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(RAW_FIR)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](R|kotlin/annotation/AnnotationTarget.FIELD|) public? final? [ResolvedTo(COMPANION_GENERATION)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +SUPER_TYPES: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(SUPER_TYPES)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[CompilerRequiredAnnotations](R|kotlin/annotation/AnnotationTarget.FIELD|) public? final? [ResolvedTo(SUPER_TYPES)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +TYPES: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public? final? [ResolvedTo(TYPES)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](R|kotlin/annotation/AnnotationTarget.FIELD|) public? final? [ResolvedTo(TYPES)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +STATUS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](R|kotlin/annotation/AnnotationTarget.FIELD|) public final [ResolvedTo(STATUS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +EXPECT_ACTUAL_MATCHING: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](R|kotlin/annotation/AnnotationTarget.FIELD|) public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public? final? const [ResolvedTo(RAW_FIR)] val FIELD: = LAZY_EXPRESSION + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Some] get(): + + } + +ARGUMENTS_OF_ANNOTATIONS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#) public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final const [ResolvedTo(STATUS)] val FIELD: = LAZY_EXPRESSION + public [ResolvedTo(STATUS)] [ContainingClassKey=Some] get(): + + } + +CONTRACTS: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#) public final [ResolvedTo(CONTRACTS)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final const [ResolvedTo(STATUS)] val FIELD: = LAZY_EXPRESSION + public [ResolvedTo(STATUS)] [ContainingClassKey=Some] get(): + + } + +IMPLICIT_TYPES_BODY_RESOLVE: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#) public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final const [ResolvedTo(STATUS)] val FIELD: = LAZY_EXPRESSION + public [ResolvedTo(STATUS)] [ContainingClassKey=Some] get(): + + } + +ANNOTATIONS_ARGUMENTS_MAPPING: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = vararg(< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#)) public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] annotation class Ann : R|kotlin/Annotation| { + public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + LAZY_super + } + + } + + public final const [ResolvedTo(STATUS)] val FIELD: = LAZY_EXPRESSION + public [ResolvedTo(STATUS)] [ContainingClassKey=Some] get(): + + } + +BODY_RESOLVE: +FILE: [ResolvedTo(IMPORTS)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(STATUS)] object Some : R|kotlin/Any| { + private [ResolvedTo(STATUS)] [ContainingClassKey=Some] constructor(): R|Some| { + LAZY_super + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = vararg(< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#)) public final [ResolvedTo(BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + super() + } + + } + + public final const [ResolvedTo(STATUS)] val FIELD: = LAZY_EXPRESSION + public [ResolvedTo(STATUS)] [ContainingClassKey=Some] get(): + + } + +FILE RAW TO BODY: +FILE: [ResolvedTo(BODY_RESOLVE)] compilerRequiredAnnotationConflict2.kt + public final [ResolvedTo(BODY_RESOLVE)] object Some : R|kotlin/Any| { + private [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Some] constructor(): R|Some| { + super() + } + + @R|kotlin/annotation/Target|[Types](allowedTargets = vararg(< + Annotation symbol resolved differently on compiler annotation and symbols stages: + - compiler annotations: FirEnumEntrySymbol kotlin/annotation/AnnotationTarget.FIELD + - compiler arguments stage: null + >#)) public final [ResolvedTo(BODY_RESOLVE)] annotation class Ann : R|kotlin/Annotation| { + public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Ann] constructor(): R|Some.Ann| { + super() + } + + } + + public final const [ResolvedTo(BODY_RESOLVE)] val FIELD: R|kotlin/String| = String() + public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Some] get(): R|kotlin/String| + + } diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirOutOfContentRootLazyDeclarationResolveTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirOutOfContentRootLazyDeclarationResolveTestGenerated.java index f6e102883b2..fc6b5b68e2b 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirOutOfContentRootLazyDeclarationResolveTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirOutOfContentRootLazyDeclarationResolveTestGenerated.java @@ -627,6 +627,18 @@ public class FirOutOfContentRootLazyDeclarationResolveTestGenerated extends Abst runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/classWithTypeParameters.kt"); } + @Test + @TestMetadata("compilerRequiredAnnotationConflict.kt") + public void testCompilerRequiredAnnotationConflict() throws Exception { + runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.kt"); + } + + @Test + @TestMetadata("compilerRequiredAnnotationConflict2.kt") + public void testCompilerRequiredAnnotationConflict2() throws Exception { + runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.kt"); + } + @Test @TestMetadata("functionInValueClass.kt") public void testFunctionInValueClass() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirSourceLazyDeclarationResolveTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirSourceLazyDeclarationResolveTestGenerated.java index 08b85f5ad10..c37d23d2a08 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirSourceLazyDeclarationResolveTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/FirSourceLazyDeclarationResolveTestGenerated.java @@ -627,6 +627,18 @@ public class FirSourceLazyDeclarationResolveTestGenerated extends AbstractFirSou runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/classWithTypeParameters.kt"); } + @Test + @TestMetadata("compilerRequiredAnnotationConflict.kt") + public void testCompilerRequiredAnnotationConflict() throws Exception { + runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict.kt"); + } + + @Test + @TestMetadata("compilerRequiredAnnotationConflict2.kt") + public void testCompilerRequiredAnnotationConflict2() throws Exception { + runTest("analysis/low-level-api-fir/testData/lazyResolve/classes/compilerRequiredAnnotationConflict2.kt"); + } + @Test @TestMetadata("functionInValueClass.kt") public void testFunctionInValueClass() throws Exception {