25bb8ce922
Yesterday I discovered some code in the front end type inference engine that I didn't expect: logic that added constraints to type inference based on the result of applying type coercions. To figure out why it was necessary, I disabled it and ran the code through trybots. It turns out that it's needed to prevent the following issues: - https://github.com/dart-lang/sdk/issues/33298 - https://github.com/dart-lang/sdk/issues/56666 Fortunately, we had regression tests for these issues: - `pkg/front_end/testcases/general/bug33298.dart` - `pkg/front_end/testcases/general/issue56666.dart` Unfortunately, those regression tests are front-end specific, meaning we didn't have any coverage for the analyzer. This CL adds coverage for the analyzer by replicating the regression tests in `tests/language`. Change-Id: Ia53b3c898549e991d6685a414d177a466a6a6964 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/494563 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com>