Commit 7fb2c53
DAS: remove_unused_local fix: Conditionally keep code on the right-side of an assignment
We already conditionally keep code on the right-side of a variable
declaration (the initializer); see test cases like
"test_assigned_awaitedInvocation". But we did not have the same behavior
for an assignment expression which follows a variable declaration.
Change-Id: I43415bced3b228db1b4d094c272a7f8af2d5d1fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/490660
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>1 parent a2fc9d8 commit 7fb2c53
2 files changed
Lines changed: 51 additions & 4 deletions
File tree
- pkg/analysis_server
- lib/src/services/correction/dart
- test/src/services/correction/fix
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
278 | | - | |
279 | 277 | | |
280 | 278 | | |
281 | 279 | | |
282 | | - | |
283 | | - | |
284 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
285 | 290 | | |
286 | 291 | | |
287 | 292 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
190 | 232 | | |
191 | 233 | | |
192 | 234 | | |
| |||
0 commit comments