Fix creating of refined FlexibleType and RawType
There was an issue that `KotlinType.equals` called in `KotlinTypeFactory.flexibleType` and `RawType` constructor produced endless recursion of types that wasn't computed yet
This commit is contained in:
committed by
Dmitry Savvinov
parent
33a31fb688
commit
b477184a3c
@@ -139,9 +139,10 @@ class FlexibleTypeImpl(lowerBound: SimpleType, upperBound: SimpleType) : Flexibl
|
||||
|
||||
@TypeRefinement
|
||||
@UseExperimental(TypeRefinement::class)
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner) =
|
||||
KotlinTypeFactory.flexibleType(
|
||||
override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): FlexibleType {
|
||||
return FlexibleTypeImpl(
|
||||
kotlinTypeRefiner.refineType(lowerBound) as SimpleType,
|
||||
kotlinTypeRefiner.refineType(upperBound) as SimpleType
|
||||
) as FlexibleType
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user