2d1094aa3f
The class `_EqualityCheckResult`, and its subtypes, were introduced prior to support for patterns. This change makes `_EqualityCheckResult` into a sealed class and changes the logic that consumes it to use `switch` statements rather than `is` tests. The resulting logic is equivalent, but I believe it's easier to read. This paves the way for adding a new kind of `_EqualityCheckResult`, which I'll need to do to support the new `sound-flow-analysis` feature. (The new kind of `_EqualityCheckResult` will be used in the circumstance where the two operands of an equality comparison are guaranteed to be unequal because of their types). Bug: https://github.com/dart-lang/sdk/issues/60438 Change-Id: I217da37847beff5a43bddb5ed734cc3e4c74970a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/420184 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
FE/analyzer shared code
This package contains logic that is shared between the front_end and analyzer packages. It is intended solely to facilitate development of the Dart SDK, and is not intended for use by end users. In particular, this package has no public API, so no guarantee is made of compatibility between one version of the package and the next.
End users should consider using the analyzer package to analyze Dart source code.