Commit 7d8c34c
[analyzer] Refine type of
The type of `InterfaceTypeImpl.element` is changed from
`InterfaceElement` to `InterfaceElementImpl`.
This allows eliminating casts from a number of call sites, at the
expense of adding a single cast to the `InterfaceTypeImpl`
constructor. This cast is safe because all concrete implementations of
`InterfaceElement` are subtypes of `InterfaceElementImpl`.
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: I5d0ffa3b14788965589a57a3c061acac2f3c6930
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403942
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>InterfaceTypeImpl.element
1 parent bdf8c21 commit 7d8c34c
File tree
2 files changed
+7
-12
lines changed- pkg/analyzer/lib/src/dart/element
2 files changed
+7
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
577 | | - | |
| 576 | + | |
578 | 577 | | |
579 | 578 | | |
580 | 579 | | |
| |||
596 | 595 | | |
597 | 596 | | |
598 | 597 | | |
| 598 | + | |
| 599 | + | |
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
| |||
696 | 697 | | |
697 | 698 | | |
698 | 699 | | |
699 | | - | |
700 | | - | |
| 700 | + | |
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| |||
881 | 881 | | |
882 | 882 | | |
883 | 883 | | |
884 | | - | |
| 884 | + | |
885 | 885 | | |
886 | 886 | | |
887 | 887 | | |
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
1025 | 1024 | | |
1026 | 1025 | | |
1027 | 1026 | | |
| |||
1077 | 1076 | | |
1078 | 1077 | | |
1079 | 1078 | | |
1080 | | - | |
1081 | 1079 | | |
1082 | 1080 | | |
1083 | 1081 | | |
| |||
1133 | 1131 | | |
1134 | 1132 | | |
1135 | 1133 | | |
1136 | | - | |
1137 | 1134 | | |
1138 | 1135 | | |
1139 | 1136 | | |
| |||
0 commit comments