Files
sdk/pkg/_fe_analyzer_shared/test/flow_analysis
Paul Berry fd33bca7ed [_fe_analyzer_shared] Change return type of shared analysis methods.
The return types of the following methods are changed to
`ExpressionTypeAnalysisResult`:

- `NullShortingMixin.finishNullShorting` (previously returned
  `SharedTypeView`).

- `NullShortingMixin.handleNullShortingStep` (previously returned
  `void`).

- `TypeAnalysisNullShortingInterface.finishNullShorting` (previously
  returned `SharedTypeView`).

- `TypeAnalyzer.analyzeExpression` (previously returned
  `SharedTypeView`).

With one exception, these methods previously returned a
`SharedTypeView` representing the expression's static type. (The
exception was `NullShortingMixin.handleNullShortingStep`, which
previously returned `void`).

This paves the way for allowing these methods to return additional
information beyond the static type of the expression, such as flow
analysis results and tree rewrite information. (This information is
currently carried around in auxiliary data structures, which leads to
bookkeeping headaches and increases the risk of bugs.)

Change-Id: I6a6a6964572a5fd7fac5496cdbfbc82a10272bba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/471323
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2026-01-08 14:40:52 -08:00
..