[CP] Fix crashes due to unhandled StructuralParameterTypes in UP in the CFE #56439
Labels
area-front-end
Use area-front-end for front end / CFE / kernel format related issues.
cherry-pick-review
Issue that need cherry pick triage to approve
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Commit(s) to merge
https://dart-review.googlesource.com/c/sdk/+/379800
Target
beta
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/380001
Issue Description
The algorithm for computing the standard upper bound of two types, also known as UP, was partially missing its implementation for
StructuralParameterType
objects. In some corner casing the lacking implementation resulted in a crash of the compiler. All platforms using the CFE were affected.What is the fix
The fix adds the missing part of the UP algorithm.
Why cherry-pick
The crashes due to the lacking implementation of UP in the CFE were reported by Flutter users: flutter/flutter#152984.
Risk
Low. The update is local and minimal and passes our CQ tests. Moreover, the missing part of the algorithm is implemented via abstracting a similar part of the same algorithm for
TypeParameterType
objects and applying it toStructuralParameterType
objects.Issue link(s)
flutter/flutter#152984
Extra Info
No response
The text was updated successfully, but these errors were encountered: