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 TypeImpl for type annotation types.
The types of `TypeAnnotationImpl.type`, and the fields that override
it, are changed from `DartType?` to `TypeImpl?`. Also, the type of
`TypeAnnotationExtension.typeOrThrow` is changed from `DartType` to
`TypeImpl`.
To reduce the number of casts that need to be added, the following
changes are made in parallel:
- An additional extension `TypeAnnotationImplExtension.typeOrThrow` is
added; this has the same behavior as
`TypeAnnotationExtension.typeOrThrow`, but it doesn't require a type
cast.
- Some field types, getter types, method return types, and method
parameter types are changed to `Impl` types in the following
classes:
- `AstRewriter`
- `EraseNonJSInteropTypes`
- `ExtensionTypeErasure`
- `FreshTypeParameters`
- `FullInvocationInferrer`
- `FunctionExpressionInvocationResolver`
- `FunctionReferenceResolver`
- `FunctionTypeBuilder`
- `InstanceCreationInferrer`
- `InvocationExpressionInferrer`
- `InvocationInferrer`
- `NamedTypeBuilder`
- `NamedTypeResolver`
- `ResolutionReader`
- `TypeAliasElementImpl`
- `TypeAliasElementImpl2`
- `TypeImpl`
- `TypeParameterElementImpl`
- `TypeSystemImpl`
There is no change to the analyzer public API.
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: I7f753508b53f6744677fd18f66858d70eb974093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405221
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
0 commit comments