-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[analyzer] Change type returned by TypeImpl.asInstanceOf.
The return types of `TypeImpl.asInstanceOf` and `TypeImpl.asInstanceOf2` are changed from `InterfaceType?` to `InterfaceTypeImpl?`. To reduce the number of casts that need to be added, the following changes are made in parallel: - The types of `TypeParameterTypeImpl.bound` and `TypeParameterTypeImpl.promotedBound` are changed to `TypeImpl`. - The type of `TypeParameterTypeImpl.element` is changed to `TypeParameterElementImpl`. - The type of `TypeParameterElementImpl.bound` is changed to `TypeImpl`. This allowed a null check and some type casts to be removed from methods in `FunctionTypeImpl` and `TypeParameterTypeImpl`. 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: I65f84e1e27c20fcb320be4af0d131792d7396cce Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404720 Commit-Queue: Paul Berry <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
- Loading branch information
1 parent
2556d01
commit 99247f1
Showing
2 changed files
with
29 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters