0887806796
Previously, any attempt to promote type A to type B produced type B if B was a subtype of A, and failed otherwise. But in order to support promotion of type parameters, we need the ability to produce a fresh "intersection type" (e.g. `T & int`). The new `TypeOperations.tryPromoteToType method` makes this possible by giving the client the opportunity to synthesize the new type when necessary. Change-Id: If671d5d865f38469a878329180c3a1c94e25a42c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122582 Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Paul Berry <paulberry@google.com>