File tree 1 file changed +3
-11
lines changed
pkg/analyzer/lib/src/generated
1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -1426,17 +1426,9 @@ class _StrongInferenceTypeSystem extends StrongTypeSystemImpl {
1426
1426
inferredTypes[i] =
1427
1427
variance.passedIn || bound.lower.isBottom ? bound.upper : bound.lower;
1428
1428
1429
- // See if the constraints on the type variable are satisfied.
1430
- //
1431
- // If not, bail out of the analysis, unless a partial solution was
1432
- // requested. If we are willing to accept a partial solution, fall back to
1433
- // the known upper bound (if any) or `dynamic` for this unsolvable type
1434
- // variable.
1435
- if (inferredTypes[i].isBottom ||
1436
- ! isSubtypeOf (inferredTypes[i],
1437
- bound.upper.substitute2 (inferredTypes, fnTypeParams)) ||
1438
- ! isSubtypeOf (bound.lower.substitute2 (inferredTypes, fnTypeParams),
1439
- inferredTypes[i])) {
1429
+ // See if the bounds can be satisfied.
1430
+ if (bound.upper.isBottom ||
1431
+ ! _typeSystem.isSubtypeOf (bound.lower, bound.upper)) {
1440
1432
// Inference failed. Bail.
1441
1433
return null ;
1442
1434
}
You can’t perform that action at this time.
0 commit comments