Commit 47269eb
analyzer: Correct dead_code report range when syntax tree is rewritten.
The range at which to report dead code is controlled by
DeadCodeVerifier's _firstDeadNode field. But nodes can be rewritten
during resolution, in which case this AstNode gets lost. We just have
to update it as needed.
Fixes #55642
Change-Id: I57c341b64f90fbea0cf251d712eb8f18cb84b2d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400800
Commit-Queue: Samuel Rawlins <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>1 parent ae07ae6 commit 47269eb
File tree
3 files changed
+22
-3
lines changed- pkg/analyzer
- lib/src
- error
- generated
- test/src/diagnostics
3 files changed
+22
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
340 | 348 | | |
341 | 349 | | |
342 | 350 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1389 | 1389 | | |
1390 | 1390 | | |
1391 | 1391 | | |
| 1392 | + | |
1392 | 1393 | | |
1393 | 1394 | | |
1394 | 1395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | 31 | | |
22 | 32 | | |
| |||
402 | 412 | | |
403 | 413 | | |
404 | 414 | | |
405 | | - | |
| 415 | + | |
406 | 416 | | |
407 | 417 | | |
408 | 418 | | |
| |||
412 | 422 | | |
413 | 423 | | |
414 | 424 | | |
415 | | - | |
| 425 | + | |
416 | 426 | | |
417 | 427 | | |
418 | 428 | | |
| |||
421 | 431 | | |
422 | 432 | | |
423 | 433 | | |
424 | | - | |
| 434 | + | |
425 | 435 | | |
426 | 436 | | |
427 | 437 | | |
| |||
0 commit comments