From a5423032a37c7a0a9c3da15763f678e108cf4393 Mon Sep 17 00:00:00 2001 From: Nikolay Lunyak Date: Fri, 1 Mar 2024 11:06:48 +0200 Subject: [PATCH] [FIR] Remove an always `false` condition from `replaceType()` Otherwise, bootstrapping fails. This condition is `false` because of `require(this is ConeKotlinTypeProjection)`, since `ConeKotlinTypeProjection` is its sibling, not a subtype. --- .../src/org/jetbrains/kotlin/fir/types/ConeTypeContext.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/ConeTypeContext.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/ConeTypeContext.kt index 7d8904ff9eb..66e53a4001d 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/ConeTypeContext.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/ConeTypeContext.kt @@ -236,7 +236,6 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty require(newType is ConeKotlinType) return when (this) { is ConeKotlinType -> newType - is ConeStarProjection -> ConeStarProjection is ConeKotlinTypeProjectionOut -> ConeKotlinTypeProjectionOut(newType) is ConeKotlinTypeProjectionIn -> ConeKotlinTypeProjectionIn(newType) is ConeKotlinTypeConflictingProjection -> ConeKotlinTypeConflictingProjection(newType)