Avoid checking trivial incorporated constraints

This commit is contained in:
Denis Zharkov
2019-12-17 12:16:13 +03:00
parent 02f3cedcf4
commit 2aa1c40de4
@@ -182,6 +182,7 @@ class ConstraintInjector(
// from ConstraintIncorporator.Context
override fun addNewIncorporatedConstraint(lowerType: KotlinTypeMarker, upperType: KotlinTypeMarker) {
if (lowerType === upperType) return
if (c.isAllowedType(lowerType) && c.isAllowedType(upperType)) {
runIsSubtypeOf(lowerType, upperType)
}