You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[analyzer] Use InterfaceElementImpl2 when interfacing with shared code.
Change the analyzer's use of the following shared generic types so
that it supplies the type parameter `InterfaceElementImpl2` instead of
`InterfaceElement` as the type it uses to represent interfaces:
- `MergedTypeConstraint`
- `TypeAnalyzer`
- `TypeAnalyzerOperations`
- `TypeAnalyzerOperationsMixin`
- `TypeConstraintFromArgument`
- `TypeConstraintFromExtendsClause`
- `TypeConstraintFromFunctionContext`
- `TypeConstraintFromReturnType`
- `TypeConstraintGenerator`
- `TypeConstraintGeneratorMixin`
- `TypeConstraintOrigin`
- `TypeDeclarationMatchResult`
- `UnknownTypeConstraintOrigin`
To avoid type casts, I tightened up the return type of
`InterfaceTypeImpl.element3` so that it returns
`InterfaceElementImpl2` instead of `InterfaceElement2`. The analyzer
public API is unchanged, though--`InterfaceType.element3` still has a
return type of `InterfaceElement2`--so clients should be unaffected.
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
#59763.
Change-Id: Ie13fcb31d8dfe0a2a256eda177a8c4a1a022008d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402428
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
0 commit comments