[FIR] provide containerDeclaration to CustomAnnotationTypeAttribute for lazy resolve
tested by FirIdeNormalAnalysisSourceModuleSymbolByPsiTestGenerated.testTypeAnnotations ^KTIJ-23547 Fixed ^KTIJ-24141 Fixed
This commit is contained in:
committed by
Space Team
parent
f32483000a
commit
9d42a5cb01
+6
-2
@@ -5,18 +5,22 @@
|
||||
|
||||
package org.jetbrains.kotlin.fir.types
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.FirDeclaration
|
||||
import org.jetbrains.kotlin.fir.expressions.FirAnnotation
|
||||
import org.jetbrains.kotlin.fir.render
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class CustomAnnotationTypeAttribute(val annotations: List<FirAnnotation>) : ConeAttribute<CustomAnnotationTypeAttribute>() {
|
||||
class CustomAnnotationTypeAttribute(
|
||||
val annotations: List<FirAnnotation>,
|
||||
val containerDeclaration: FirDeclaration? = null,
|
||||
) : ConeAttribute<CustomAnnotationTypeAttribute>() {
|
||||
override fun union(other: CustomAnnotationTypeAttribute?): CustomAnnotationTypeAttribute? = null
|
||||
|
||||
override fun intersect(other: CustomAnnotationTypeAttribute?): CustomAnnotationTypeAttribute? = null
|
||||
|
||||
override fun add(other: CustomAnnotationTypeAttribute?): CustomAnnotationTypeAttribute {
|
||||
if (other == null || other === this) return this
|
||||
return CustomAnnotationTypeAttribute(annotations + other.annotations)
|
||||
return CustomAnnotationTypeAttribute(annotations + other.annotations, containerDeclaration)
|
||||
}
|
||||
|
||||
override fun isSubtypeOf(other: CustomAnnotationTypeAttribute?): Boolean = true
|
||||
|
||||
Reference in New Issue
Block a user