2522063236
The shared abstract class TypeConstraintGenerator is introduced and is set as the parent for both the Analyzer's TypeConstraintGatherer and the CFE's TypeConstraintGenerator. The interface of the shared abstract class is minimal, to support the treatment of the discrepancy between the Analyzer and the CFE around FutureOr types. The discrepancy between the Analyzer and the CFE is seaprated out into a smaller method and can be controlled via a boolean flag that switches between the behaviors of the two frontends. The flag is called requiredEmptyNullabilitySuffix and is passed as a named parameter to TypeConstraintGenerator.performSubtypeConstraintGenerationForFutureOr. In response to https://github.com/dart-lang/sdk/issues/55344 Part of https://github.com/dart-lang/sdk/issues/54902 Change-Id: I272b57b573377a54977a516ce6e378953bd1c0e8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373480 Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>