Removed unnecessary check to prevent infinite recursion in incorporation
This commit is contained in:
+3
-3
@@ -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=???
|
||||
-3
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user