Files
sdk/pkg/_fe_analyzer_shared
Paul Berry 7da7a32b93 Flow analysis: pass variable type to FlowAnalysis.declare.
This will help facilitate a follow-up CL in which I plan to modify
flow analysis data structures to track the static (unpromoted) type of
each variable, rather than querying that information from the client.
That in turn will help address some subtle bugs in the flow analysis
of patterns wherein an invalid promotion chain is getting created
because the wrong variable is being queried.

As part of this change, I've cleaned up the logic that calls
`FlowAnalysis.declare` for the synthetic variables associated with
or-patterns and switch cases that share a body; previously this logic
was making redundant calls to `declare`; now it is only calling
`declare` once per synthetic variable.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I8e8e4aa71afe3ac7ecdc474f023ec513dc7286b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278693
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-01-11 19:22:15 +00:00
..
2021-04-07 10:28:38 +00:00
2022-02-14 14:06:34 +00:00

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.