Commit 03fd2aa
[analyzer] Use AstNodeImpl when interfacing with shared code
Change the analyzer's use of the following generic types so that it
supplies the type parameter `AstNodeImpl` instead of `AstNode` as the
type it uses to represent AST nodes:
- `AssignedVariables`
- `AssignedVariablesForTesting`
- `CaseHeadOrDefaultInfo`
- `FlowAnalysis`
- `MatchContext`
- `SwitchExpressionMemberInfo`
- `SwitchStatementMemberInfo`
- `TypeAnalyzer`
- `TypeAnalyzerErrors`
In some places I was able to avoid adding casts by changing method
parameters to accept concrete AST node types instead of abstract
public interface types. This required adding the `covariant` keyword
to one method (`ResolverVisitor.visitTryStatement`).
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: I98a6df704b64ff3efd3c73d05fb47409828fbf04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403281
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent f023483 commit 03fd2aa
File tree
4 files changed
+27
-23
lines changed- pkg/analyzer/lib/src
- dart/resolver
- generated
4 files changed
+27
-23
lines changedLines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
| 99 | + | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
441 | 445 | | |
442 | 446 | | |
443 | 447 | | |
| |||
810 | 814 | | |
811 | 815 | | |
812 | 816 | | |
813 | | - | |
| 817 | + | |
814 | 818 | | |
815 | 819 | | |
816 | 820 | | |
| |||
977 | 981 | | |
978 | 982 | | |
979 | 983 | | |
980 | | - | |
981 | | - | |
| 984 | + | |
| 985 | + | |
982 | 986 | | |
983 | 987 | | |
984 | 988 | | |
| |||
995 | 999 | | |
996 | 1000 | | |
997 | 1001 | | |
998 | | - | |
| 1002 | + | |
999 | 1003 | | |
1000 | 1004 | | |
1001 | 1005 | | |
1002 | 1006 | | |
1003 | | - | |
| 1007 | + | |
1004 | 1008 | | |
1005 | 1009 | | |
1006 | 1010 | | |
| |||
3792 | 3796 | | |
3793 | 3797 | | |
3794 | 3798 | | |
3795 | | - | |
| 3799 | + | |
3796 | 3800 | | |
3797 | 3801 | | |
3798 | 3802 | | |
| |||
0 commit comments