K2: don't duplicate custom annotations in types #KT-54275 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-10-07 11:19:43 +02:00
committed by Space Team
parent d491eba629
commit 62ba1277bb
2 changed files with 2 additions and 2 deletions
@@ -15,7 +15,7 @@ class CustomAnnotationTypeAttribute(val annotations: List<FirAnnotation>) : Cone
override fun intersect(other: CustomAnnotationTypeAttribute?): CustomAnnotationTypeAttribute? = null
override fun add(other: CustomAnnotationTypeAttribute?): CustomAnnotationTypeAttribute {
if (other == null) return this
if (other == null || other === this) return this
return CustomAnnotationTypeAttribute(annotations + other.annotations)
}