diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/exceptionInRepeatedAnnotation.fir.txt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/exceptionInRepeatedAnnotation.fir.txt index 3f32c97a821..3683345fd9e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/exceptionInRepeatedAnnotation.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/exceptionInRepeatedAnnotation.fir.txt @@ -20,7 +20,7 @@ FILE: exceptionInRepeatedAnnotation.kt public final inline fun R|EventHandler|.withPriority(): R|EventListener<@R|kotlin/ParameterName|(name = String(e)) E>| { ^withPriority Q|EventListener|.R|/EventListener.Companion.invoke|(this@R|/withPriority|) } - public final inline fun R|EventHandler|.withDefaultPriority(): R|EventListener<@R|kotlin/ParameterName|(name = String(e)) @R|kotlin/ParameterName|(name = String(e)) E>| { + public final inline fun R|EventHandler|.withDefaultPriority(): R|EventListener<@R|kotlin/ParameterName|(name = String(e)) E>| { ^withDefaultPriority this@R|/withDefaultPriority|.R|/withPriority|() } public abstract class Event : R|kotlin/Any| { diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/CustomAnnotationTypeAttribute.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/CustomAnnotationTypeAttribute.kt index f02c2ef2226..36f79c85097 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/CustomAnnotationTypeAttribute.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/types/CustomAnnotationTypeAttribute.kt @@ -15,7 +15,7 @@ class CustomAnnotationTypeAttribute(val annotations: List) : 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) }