Don't add a constraint T <: DONT_CARE from upper bounds

This commit is contained in:
Svetlana Isakova
2014-12-02 15:14:48 +03:00
parent f9d4a68c6e
commit 070dba69fa
2 changed files with 2 additions and 2 deletions
@@ -149,7 +149,7 @@ public class ConstraintSystemImpl : ConstraintSystem {
for (declaredUpperBound in typeVariable.getUpperBounds()) {
if (KotlinBuiltIns.getInstance().getNullableAnyType() == declaredUpperBound) continue //todo remove this line (?)
val substitutedBound = constantSubstitutor?.substitute(declaredUpperBound, Variance.INVARIANT)
if (substitutedBound != null) {
if (substitutedBound != null && !isErrorOrSpecialType(substitutedBound)) {
typeBounds.addBound(UPPER_BOUND, substitutedBound, TYPE_BOUND_POSITION.position(typeVariable.getIndex()))
}
}