FIR: Avoid calling ClassId::asString from ConeTypeContext

This commit is contained in:
Denis Zharkov
2019-06-18 12:50:14 +03:00
parent 7d7f4a8783
commit 9d02fe564c
@@ -338,14 +338,13 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext {
} }
override fun TypeConstructorMarker.isAnyConstructor(): Boolean { override fun TypeConstructorMarker.isAnyConstructor(): Boolean {
return this is ConeClassLikeSymbol && classId.asString() == "kotlin/Any" return this is ConeClassLikeSymbol && classId == StandardClassIds.Any
} }
override fun TypeConstructorMarker.isNothingConstructor(): Boolean { override fun TypeConstructorMarker.isNothingConstructor(): Boolean {
return this is ConeClassLikeSymbol && classId.asString() == "kotlin/Nothing" return this is ConeClassLikeSymbol && classId == StandardClassIds.Nothing
} }
override fun KotlinTypeMarker.isNotNullNothing(): Boolean { override fun KotlinTypeMarker.isNotNullNothing(): Boolean {
require(this is ConeKotlinType) require(this is ConeKotlinType)
return typeConstructor().isNothingConstructor() && !this.nullability.isNullable return typeConstructor().isNothingConstructor() && !this.nullability.isNullable