Commit 462bcaf
[analyzer] Make two derived classes for PropertyAccessorElementImpl.
Derived class `GetterFragmentImpl` is used for getters and
`SetterFragmentImpl` is used for setters. Only `GetterFragmentImpl`
implements `GetterFragment` and only `SetterFragmentImpl` implements
`SetterFragment`. This ensures that clients performing `is
GetterFragment` and `is SetterFragment` checks get the expected
behavior. (Previously, any instance of `PropertyAccessorElementImpl`
would satisfy *both* `is GetterFragment` and `is SetterFragment`
tests).
This made it possible for the types of getters defined in
`GetterFragment` and `SetterFragment` to be more precise, which in
turn allowed some casts to be removed from the analyzer.
Change-Id: I243e8f6547d9aed77175e8c14c48af8970bfd528
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412140
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent b5ff3b8 commit 462bcaf
File tree
16 files changed
+279
-255
lines changed- pkg
- analysis_server/lib/src/services/refactoring/legacy
- analyzer
- lib
- dart/element
- src
- dart/element
- generated
- testing
- summary2
- test_utilities
- test/src/dart/element
16 files changed
+279
-255
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3873 | 3873 | | |
3874 | 3874 | | |
3875 | 3875 | | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
3876 | 3879 | | |
3877 | 3880 | | |
3878 | 3881 | | |
| |||
4203 | 4206 | | |
4204 | 4207 | | |
4205 | 4208 | | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
4206 | 4212 | | |
4207 | 4213 | | |
4208 | 4214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1181 | 1181 | | |
1182 | 1182 | | |
1183 | 1183 | | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
| 1184 | + | |
| 1185 | + | |
1189 | 1186 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
| 1187 | + | |
| 1188 | + | |
1195 | 1189 | | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
| 1190 | + | |
| 1191 | + | |
1200 | 1192 | | |
1201 | 1193 | | |
1202 | 1194 | | |
| |||
2502 | 2494 | | |
2503 | 2495 | | |
2504 | 2496 | | |
2505 | | - | |
2506 | | - | |
2507 | | - | |
2508 | | - | |
| 2497 | + | |
| 2498 | + | |
2509 | 2499 | | |
2510 | | - | |
2511 | | - | |
2512 | | - | |
2513 | | - | |
2514 | | - | |
| 2500 | + | |
| 2501 | + | |
2515 | 2502 | | |
2516 | | - | |
2517 | | - | |
2518 | | - | |
2519 | | - | |
2520 | | - | |
| 2503 | + | |
| 2504 | + | |
2521 | 2505 | | |
2522 | 2506 | | |
2523 | 2507 | | |
| |||
0 commit comments