FIR: Fix incorrect optimization for integer literals

This commit is contained in:
Denis Zharkov
2020-07-30 15:32:06 +03:00
parent ad8709b2dc
commit db93b9052b
8 changed files with 25 additions and 25 deletions
@@ -45,7 +45,7 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
override fun SimpleTypeMarker.fastCorrespondingSupertypes(constructor: TypeConstructorMarker): List<SimpleTypeMarker>? {
require(this is ConeKotlinType)
return if (this is ConeIntegerLiteralType) {
supertypes
supertypes.filter { isEqualTypeConstructors(constructor, it.typeConstructor()) }
} else {
session.correspondingSupertypesCache.getCorrespondingSupertypes(this, constructor)
}