Files
sdk/pkg/analyzer/lib
Paul Berry 03fd2aaa4e [analyzer] Use AstNodeImpl when interfacing with shared code
Change the analyzer's use of the following generic types so that it
supplies the type parameter `AstNodeImpl` instead of `AstNode` as the
type it uses to represent AST nodes:

- `AssignedVariables`
- `AssignedVariablesForTesting`
- `CaseHeadOrDefaultInfo`
- `FlowAnalysis`
- `MatchContext`
- `SwitchExpressionMemberInfo`
- `SwitchStatementMemberInfo`
- `TypeAnalyzer`
- `TypeAnalyzerErrors`

In some places I was able to avoid adding casts by changing method
parameters to accept concrete AST node types instead of abstract
public interface types. This required adding the `covariant` keyword
to one method (`ResolverVisitor.visitTryStatement`).

This is part of a larger arc of work to change the analyzer's use of
the shared code so that the type parameters it supplies are not part
of the analyzer public API. See
https://github.com/dart-lang/sdk/issues/59763.

Change-Id: I98a6df704b64ff3efd3c73d05fb47409828fbf04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403281
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2025-01-06 14:39:23 -08:00
..