[LL FIR] StubBasedFirMemberDeserializer: add missed deprecation provider

^KT-60996 Fixed
This commit is contained in:
Dmitrii Gridin
2024-03-05 16:22:56 +01:00
committed by Space Team
parent 805b7bc8f4
commit 28c80a1581
5 changed files with 22 additions and 50 deletions
@@ -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)
@@ -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)
@@ -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))
}
}
@@ -1,8 +1,5 @@
// !LANGUAGE: +TypeAliases
// !API_VERSION: 1.0
// IGNORE_DIAGNOSTIC_API
// IGNORE_REVERSED_RESOLVE
// ^KT-60996
// FILE: test.kt
val fooException = <!API_NOT_AVAILABLE!>Exception<!>("foo")
val barException = kotlin.<!API_NOT_AVAILABLE!>Exception<!>("bar")
@@ -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.<!UNRESOLVED_REFERENCE!>Exception<!>("bar")