diff --git a/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.standalone.fir.txt b/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.standalone.fir.txt deleted file mode 100644 index 8ddf188f3e5..00000000000 --- a/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.standalone.fir.txt +++ /dev/null @@ -1,43 +0,0 @@ -Diagnostics from elements: - for PSI element of type KtNameReferenceExpression at (71,21-39) - DEPRECATION text ranges: [(302,320)] - PSI: KtNameReferenceExpression at (71,21-39) - for PSI element of type KtNameReferenceExpression at (72,21-39) - DEPRECATION text ranges: [(352,370)] - PSI: KtNameReferenceExpression at (72,21-39) - for PSI element of type KtNameReferenceExpression at (74,21-40) - DEPRECATION text ranges: [(396,415)] - PSI: KtNameReferenceExpression at (74,21-40) - for PSI element of type KtNameReferenceExpression at (75,21-40) - DEPRECATION text ranges: [(447,466)] - PSI: KtNameReferenceExpression at (75,21-40) - for PSI element of type KtNameReferenceExpression at (77,21-39) - DEPRECATION text ranges: [(492,510)] - PSI: KtNameReferenceExpression at (77,21-39) - for PSI element of type KtNameReferenceExpression at (79,5-23) - DEPRECATION text ranges: [(518,536)] - PSI: KtNameReferenceExpression at (79,5-23) - for PSI element of type KtNameReferenceExpression at (80,5-23) - DEPRECATION text ranges: [(552,570)] - PSI: KtNameReferenceExpression at (80,5-23) - for PSI element of type KtNameReferenceExpression at (82,5-24) - DEPRECATION text ranges: [(580,599)] - PSI: KtNameReferenceExpression at (82,5-24) - for PSI element of type KtNameReferenceExpression at (83,5-24) - DEPRECATION text ranges: [(615,634)] - PSI: KtNameReferenceExpression at (83,5-24) - for PSI element of type KtNameReferenceExpression at (85,5-23) - DEPRECATION text ranges: [(644,662)] - PSI: KtNameReferenceExpression at (85,5-23) - for PSI element of type KtNameReferenceExpression at (87,5-37) - DEPRECATION text ranges: [(670,702)] - PSI: KtNameReferenceExpression at (87,5-37) - for PSI element of type KtTypeReference at (67,22-39) - DEPRECATION text ranges: [(145,162)] - PSI: KtTypeReference at (67,22-39) - for PSI element of type KtTypeReference at (68,26-47) - DEPRECATION text ranges: [(189,210)] - PSI: KtTypeReference at (68,26-47) - for PSI element of type KtTypeReference at (69,35-65) - TYPEALIAS_EXPANSION_DEPRECATION text ranges: [(246,276)] - PSI: KtTypeReference at (69,35-65) diff --git a/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.txt b/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.txt index 37f90ba2224..8ddf188f3e5 100644 --- a/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.txt +++ b/analysis/analysis-api/testData/components/diagnosticsProvider/diagnostics/deprecationFromLibrary.txt @@ -5,6 +5,12 @@ Diagnostics from elements: for PSI element of type KtNameReferenceExpression at (72,21-39) DEPRECATION text ranges: [(352,370)] PSI: KtNameReferenceExpression at (72,21-39) + for PSI element of type KtNameReferenceExpression at (74,21-40) + DEPRECATION text ranges: [(396,415)] + PSI: KtNameReferenceExpression at (74,21-40) + for PSI element of type KtNameReferenceExpression at (75,21-40) + DEPRECATION text ranges: [(447,466)] + PSI: KtNameReferenceExpression at (75,21-40) for PSI element of type KtNameReferenceExpression at (77,21-39) DEPRECATION text ranges: [(492,510)] PSI: KtNameReferenceExpression at (77,21-39) @@ -14,6 +20,12 @@ Diagnostics from elements: for PSI element of type KtNameReferenceExpression at (80,5-23) DEPRECATION text ranges: [(552,570)] PSI: KtNameReferenceExpression at (80,5-23) + for PSI element of type KtNameReferenceExpression at (82,5-24) + DEPRECATION text ranges: [(580,599)] + PSI: KtNameReferenceExpression at (82,5-24) + for PSI element of type KtNameReferenceExpression at (83,5-24) + DEPRECATION text ranges: [(615,634)] + PSI: KtNameReferenceExpression at (83,5-24) for PSI element of type KtNameReferenceExpression at (85,5-23) DEPRECATION text ranges: [(644,662)] PSI: KtNameReferenceExpression at (85,5-23) @@ -23,6 +35,9 @@ Diagnostics from elements: for PSI element of type KtTypeReference at (67,22-39) DEPRECATION text ranges: [(145,162)] PSI: KtTypeReference at (67,22-39) + for PSI element of type KtTypeReference at (68,26-47) + DEPRECATION text ranges: [(189,210)] + PSI: KtTypeReference at (68,26-47) for PSI element of type KtTypeReference at (69,35-65) TYPEALIAS_EXPANSION_DEPRECATION text ranges: [(246,276)] PSI: KtTypeReference at (69,35-65) diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/stubBased/deserialization/StubBasedFirMemberDeserializer.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/stubBased/deserialization/StubBasedFirMemberDeserializer.kt index b6b8dac46b5..18b3c414c51 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/stubBased/deserialization/StubBasedFirMemberDeserializer.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/stubBased/deserialization/StubBasedFirMemberDeserializer.kt @@ -213,6 +213,7 @@ internal class StubBasedFirMemberDeserializer( } resolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES typeParameters += local.typeDeserializer.ownTypeParameters.map { it.fir } + deprecationsProvider = annotations.getDeprecationsProviderFromAnnotations(c.session, fromJava = false) }.apply { sourceElement = c.containerSource } @@ -245,6 +246,8 @@ internal class StubBasedFirMemberDeserializer( replaceAnnotations( c.annotationDeserializer.loadAnnotations(getter) ) + + replaceDeprecationsProvider(getDeprecationsProvider(c.session)) containingClassForStaticMemberAttr = c.dispatchReceiver?.lookupTag } } @@ -280,6 +283,8 @@ internal class StubBasedFirMemberDeserializer( replaceAnnotations( c.annotationDeserializer.loadAnnotations(setter) ) + + replaceDeprecationsProvider(getDeprecationsProvider(c.session)) containingClassForStaticMemberAttr = c.dispatchReceiver?.lookupTag } } @@ -398,13 +403,14 @@ internal class StubBasedFirMemberDeserializer( this.containerSource = c.containerSource this.initializer = c.annotationDeserializer.loadConstant(property, symbol.callableId) - deprecationsProvider = annotations.getDeprecationsProviderFromAnnotations(c.session, fromJava = false) property.contextReceivers.mapNotNull { it.typeReference() }.mapTo(contextReceivers, ::loadContextReceiver) }.apply { setLazyPublishedVisibility(c.session) this.getter?.setLazyPublishedVisibility(annotations, this, c.session) this.setter?.setLazyPublishedVisibility(annotations, this, c.session) + + replaceDeprecationsProvider(getDeprecationsProvider(c.session)) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.fir.kt index 71525705c96..60e55ad9518 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.fir.kt @@ -1,8 +1,5 @@ // !LANGUAGE: +TypeAliases // !API_VERSION: 1.0 -// IGNORE_DIAGNOSTIC_API -// IGNORE_REVERSED_RESOLVE -// ^KT-60996 // FILE: test.kt val fooException = Exception("foo") val barException = kotlin.Exception("bar") diff --git a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt index 8e8fe871cc6..80cc7440061 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt @@ -1,8 +1,5 @@ // !LANGUAGE: +TypeAliases // !API_VERSION: 1.0 -// IGNORE_DIAGNOSTIC_API -// IGNORE_REVERSED_RESOLVE -// ^KT-60996 // FILE: test.kt val fooException = Exception("foo") val barException = kotlin.Exception("bar")