fcb5e06fdd
Change the analyzer's use of the following shared classes and mixins to supply `PromotableElement2` instead of `PromotableElement` as the type parameter that represents promotable variables: - `AssignedVariables` - `AssignedVariablesForTesting` - `CaseHeadOrDefaultInfo` - `DemoteViaExplicitWrite` - `FlowAnalysis` - `GeneratedTypeConstraint` - `MatchContext` - `MergedTypeConstraint` - `NonPromotionReasonVisitor` - `SwitchExpressionMemberInfo` - `SwitchStatementMemberInfo` - `TypeAnalyzer` - `TypeAnalyzerErrors` - `TypeAnalyzerOperations` - `TypeAnalyzerOperationsMixin` - `TypeConstraintFromArgument` - `TypeConstraintFromExtendsClause` - `TypeConstraintFromFunctionContext` - `TypeConstraintFromReturnType` - `TypeConstraintGenerator` - `TypeConstraintGeneratorMixin` - `TypeConstraintOrigin` - `UnknownTypeConstraintOrigin` - `VariableBinder` - `VariableBinderErrors` This ensures that all references to variables within the shared code are using the new analyzer element model. As a result of this type change, a lot of analyzer code that interfaces with shared logic needs to change to use the new element model. Also, a few additional members need to be added to `BindPatternVariableElementImpl2`, `JoinPatternVariableElementImpl2`, `LocalVariableElementImpl2`, and `PatternVariableElementImpl2` to allow members of the underlying `_wrappedElement` to be accessed. Change-Id: Ie925eeb82523c769c4d869a37551718f75d334ca Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400660 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@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.