Don't add a constraint T <: DONT_CARE from upper bounds
This commit is contained in:
@@ -4,7 +4,7 @@ SUBTYPE T Int
|
||||
|
||||
type parameter bounds:
|
||||
T <: kotlin.Int(SPECIAL)
|
||||
P <: ???(TYPE_BOUND_POSITION(1)), <: kotlin.Int(COMPOUND_CONSTRAINT_POSITION(TYPE_BOUND_POSITION(1), SPECIAL)
|
||||
P <: kotlin.Int(COMPOUND_CONSTRAINT_POSITION(TYPE_BOUND_POSITION(1), SPECIAL)
|
||||
status:
|
||||
-hasCannotCaptureTypesError: false
|
||||
-hasConflictingConstraints: false
|
||||
|
||||
+1
-1
@@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user