Commit a3917df
[analyzer] Change RecordType to stop implementing SharedRecordTypeStructure.
When I introduced the `SharedRecordType` class in
https://dart-review.googlesource.com/c/sdk/+/362481 (now called
`SharedRecordTypeStructure`), I failed to realize that a side effect
of this change was to expose the shared getter `positionalTypes`
through the analyzer's public API. Later, when the getter
`sortedNamedTypes` was added to this class, that also was
inadvertently exposed through the analyzer's public API.
To correct that mistake, I've moved the reference to
`SharedRecordTypeStructure` from the `implements` clause of
`RecordType` to the `implements` clause of `RecordTypeImpl`.
To avoid this change causing a breakage for clients, I've also added
deprecated declarations of the getters `positionalTypes` and
`sortedNamedTypes` to the `RecordType` class. This ensures that if any
analyzer clients have already started depending on them, their code
will continue to work, but they'll be alerted to the fact that the
members will be removed in the future.
In the process, I improved the types of `positionalTypes` and
`sortedNamedTypes` so that they no longer refer to shared types; this
should reduce further API exposure.
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: If56b8689180d2214eccd7ec8ec4f4f10b31358f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402620
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>1 parent 6b21d8b commit a3917df
2 files changed
+23
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
578 | | - | |
| 577 | + | |
579 | 578 | | |
580 | 579 | | |
581 | 580 | | |
| |||
591 | 590 | | |
592 | 591 | | |
593 | 592 | | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
594 | 611 | | |
595 | 612 | | |
596 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1338 | 1338 | | |
1339 | 1339 | | |
1340 | 1340 | | |
1341 | | - | |
| 1341 | + | |
| 1342 | + | |
1342 | 1343 | | |
1343 | 1344 | | |
1344 | 1345 | | |
| |||
1395 | 1396 | | |
1396 | 1397 | | |
1397 | 1398 | | |
1398 | | - | |
| 1399 | + | |
1399 | 1400 | | |
1400 | 1401 | | |
1401 | | - | |
| 1402 | + | |
1402 | 1403 | | |
1403 | 1404 | | |
1404 | 1405 | | |
| |||
0 commit comments