Files
sdk/pkg/_fe_analyzer_shared
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
..
2025-02-19 09:33:31 -08: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.