Removed unnecessary check to prevent infinite recursion in incorporation

This commit is contained in:
Svetlana Isakova
2015-07-07 21:32:20 +03:00
parent 92e7ed0425
commit 4701310852
2 changed files with 3 additions and 6 deletions
@@ -4,11 +4,11 @@ EQUAL T Int
EQUAL T My<T>
type parameter bounds:
T := Int, := My<T>*
T := Int, := My<T>*, := My<Int>
status:
-hasCannotCaptureTypesError: false
-hasConflictingConstraints: false
-hasConflictingConstraints: true
-hasContradiction: true
-hasErrorInConstrainingTypes: false
-hasTypeConstructorMismatch: false
@@ -18,4 +18,4 @@ status:
-isSuccessful: false
result:
T=Int
T=???
@@ -75,9 +75,6 @@ private fun ConstraintSystemImpl.generateNewBound(bound: Bound, substitution: Bo
// Here <=> means lower_bound, upper_bound or exact_bound constraint.
// Then a new bound 'T <=> My<_/in/out Type>' can be generated.
// We don't substitute anything into recursive constraints
if (substitution.typeVariable == bound.typeVariable) return
val substitutedType = when (substitution.kind) {
EXACT_BOUND -> substitution.constrainingType
UPPER_BOUND -> CapturedType(TypeProjectionImpl(Variance.OUT_VARIANCE, substitution.constrainingType))