[FIR] Add workaround for exception in JavaOverrideChecker.buildErasure
- `useMutableOrEmpty` causes the bounds to be replaced atomically, which avoids the race described in KT-60324. ^KT-60324 fixed ^KT-60445
This commit is contained in:
committed by
Space Team
parent
73032213f0
commit
85c4d6b67b
+1
-1
@@ -52,7 +52,7 @@ class FirTypeParameterBuilder : FirAnnotationContainerBuilder {
|
||||
containingDeclarationSymbol,
|
||||
variance,
|
||||
isReified,
|
||||
bounds,
|
||||
bounds.toMutableOrEmpty(),
|
||||
annotations.toMutableOrEmpty(),
|
||||
)
|
||||
}
|
||||
|
||||
+2
-3
@@ -37,7 +37,7 @@ internal class FirTypeParameterImpl(
|
||||
override val containingDeclarationSymbol: FirBasedSymbol<*>,
|
||||
override val variance: Variance,
|
||||
override val isReified: Boolean,
|
||||
override val bounds: MutableList<FirTypeRef>,
|
||||
override var bounds: MutableOrEmptyList<FirTypeRef>,
|
||||
override var annotations: MutableOrEmptyList<FirAnnotation>,
|
||||
) : FirTypeParameter() {
|
||||
|
||||
@@ -63,8 +63,7 @@ internal class FirTypeParameterImpl(
|
||||
}
|
||||
|
||||
override fun replaceBounds(newBounds: List<FirTypeRef>) {
|
||||
bounds.clear()
|
||||
bounds.addAll(newBounds)
|
||||
bounds = newBounds.toMutableOrEmpty()
|
||||
}
|
||||
|
||||
override fun replaceAnnotations(newAnnotations: List<FirAnnotation>) {
|
||||
|
||||
Reference in New Issue
Block a user