Commit 749de93
[analyzer] Refine types returned by TypeSystemImpl methods.
In the following methods in `TypeSystemImpl`, the return type is
changed from `DartType` to `TypeImpl`:
- `greatestClosure`
- `greatestLowerBound`
- `leastClosure`
- `leastUpperBound`
- `makeNullable`
- `promoteToNonNull`
This required adding a few casts to `TypeSystemImpl`,
`LeastGreatestClosureHelper`, and `InterfaceTypeImpl`, which I believe
I will be able to remove in future CLs. It also allowed removing some
casts from `GreatestLowerBoundHelper`, `LeastUpperBoundHelper`, and
`InterfaceTypeImpl`.
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: I24f27090bb2d07ae33be9c2c8d7908ef71a96929
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404640
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent 3417d1a commit 749de93
File tree
6 files changed
+61
-58
lines changed- pkg
- analyzer/lib/src/dart/element
- linter/lib/src/rules
6 files changed
+61
-58
lines changedLines changed: 10 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
103 | 102 | | |
104 | 103 | | |
105 | 104 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 105 | + | |
| 106 | + | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
| |||
153 | 149 | | |
154 | 150 | | |
155 | 151 | | |
156 | | - | |
| 152 | + | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
| |||
170 | 166 | | |
171 | 167 | | |
172 | 168 | | |
173 | | - | |
| 169 | + | |
174 | 170 | | |
175 | 171 | | |
176 | 172 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
| 183 | + | |
| 184 | + | |
189 | 185 | | |
190 | 186 | | |
191 | 187 | | |
192 | | - | |
| 188 | + | |
193 | 189 | | |
194 | 190 | | |
195 | 191 | | |
| |||
258 | 254 | | |
259 | 255 | | |
260 | 256 | | |
261 | | - | |
| 257 | + | |
262 | 258 | | |
263 | 259 | | |
264 | 260 | | |
| |||
378 | 374 | | |
379 | 375 | | |
380 | 376 | | |
381 | | - | |
| 377 | + | |
382 | 378 | | |
383 | 379 | | |
384 | 380 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
57 | | - | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
Lines changed: 14 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
| 442 | + | |
| 443 | + | |
447 | 444 | | |
448 | 445 | | |
449 | 446 | | |
| |||
508 | 505 | | |
509 | 506 | | |
510 | 507 | | |
511 | | - | |
512 | | - | |
| 508 | + | |
| 509 | + | |
513 | 510 | | |
514 | | - | |
| 511 | + | |
515 | 512 | | |
516 | 513 | | |
517 | 514 | | |
| |||
622 | 619 | | |
623 | 620 | | |
624 | 621 | | |
625 | | - | |
| 622 | + | |
626 | 623 | | |
627 | 624 | | |
628 | 625 | | |
| |||
744 | 741 | | |
745 | 742 | | |
746 | 743 | | |
747 | | - | |
748 | | - | |
| 744 | + | |
| 745 | + | |
749 | 746 | | |
750 | 747 | | |
751 | 748 | | |
752 | | - | |
| 749 | + | |
753 | 750 | | |
754 | 751 | | |
755 | 752 | | |
756 | | - | |
| 753 | + | |
757 | 754 | | |
758 | 755 | | |
759 | 756 | | |
760 | | - | |
| 757 | + | |
761 | 758 | | |
762 | 759 | | |
763 | 760 | | |
| |||
798 | 795 | | |
799 | 796 | | |
800 | 797 | | |
801 | | - | |
| 798 | + | |
802 | 799 | | |
803 | 800 | | |
804 | 801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
541 | | - | |
| 541 | + | |
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
| 618 | + | |
617 | 619 | | |
618 | | - | |
| 620 | + | |
619 | 621 | | |
620 | 622 | | |
621 | 623 | | |
| |||
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
| 631 | + | |
| 632 | + | |
629 | 633 | | |
630 | 634 | | |
631 | | - | |
| 635 | + | |
632 | 636 | | |
633 | 637 | | |
634 | 638 | | |
| |||
644 | 648 | | |
645 | 649 | | |
646 | 650 | | |
647 | | - | |
| 651 | + | |
648 | 652 | | |
649 | 653 | | |
650 | 654 | | |
| |||
1161 | 1165 | | |
1162 | 1166 | | |
1163 | 1167 | | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
| 1168 | + | |
1168 | 1169 | | |
1169 | 1170 | | |
1170 | 1171 | | |
1171 | 1172 | | |
1172 | | - | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
| 1173 | + | |
1176 | 1174 | | |
1177 | 1175 | | |
1178 | 1176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
642 | | - | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
643 | 646 | | |
644 | 647 | | |
645 | 648 | | |
| |||
1380 | 1383 | | |
1381 | 1384 | | |
1382 | 1385 | | |
1383 | | - | |
| 1386 | + | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
| |||
1419 | 1422 | | |
1420 | 1423 | | |
1421 | 1424 | | |
1422 | | - | |
1423 | | - | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1424 | 1430 | | |
1425 | 1431 | | |
1426 | 1432 | | |
1427 | 1433 | | |
1428 | | - | |
| 1434 | + | |
1429 | 1435 | | |
1430 | 1436 | | |
1431 | 1437 | | |
| |||
1485 | 1491 | | |
1486 | 1492 | | |
1487 | 1493 | | |
1488 | | - | |
| 1494 | + | |
1489 | 1495 | | |
1490 | 1496 | | |
1491 | 1497 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
| 302 | + | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
| |||
0 commit comments