Optimize subtyping for case of objects identity
It may be rather frequent (e.g. in case of types without arguments or for dispatch receiver parameters)
This commit is contained in:
@@ -113,6 +113,7 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
|
||||
type.constructor.isDenotable && !type.isDynamic() && type.lowerIfFlexible().constructor == type.upperIfFlexible().constructor
|
||||
|
||||
fun TypeCheckerContext.isSubtypeOf(subType: UnwrappedType, superType: UnwrappedType): Boolean {
|
||||
if (subType === superType) return true
|
||||
val newSubType = transformToNewType(subType)
|
||||
val newSuperType = transformToNewType(superType)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user