Commit 5f9a049
Elements. Make InterfaceElementImpl.session AnalysisSessionImpl.
Strengthen the `session` type on `InterfaceElementImpl` from nullable
`AnalysisSession?` to concrete `AnalysisSessionImpl` and route it
through `library.session`. This reflects the actual runtime type,
eliminates downcasts, and makes the API non-nullable.
Key changes:
- `InterfaceElementImpl.session` now returns `AnalysisSessionImpl`.
- Replaced usages of `(session as AnalysisSessionImpl)` with direct `session.inheritanceManager...` calls (e.g., inherited/interface member lookups and overrides).
- Removed a generic nullable `session` getter that delegated to an enclosing fragment, and dropped redundant fragment-level overrides where the library already provides the session.
Why:
- Improves type safety and clarity by matching the concrete session type.
- Removes unnecessary nullability and casting boilerplate.
- Centralizes the source of truth for the session via the owning library.
Change-Id: I2f8e045c34218e9e10caa794b830219326c7da1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446006
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>1 parent 86500f1 commit 5f9a049
1 file changed
+7
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3393 | 3393 | | |
3394 | 3394 | | |
3395 | 3395 | | |
3396 | | - | |
3397 | | - | |
3398 | | - | |
3399 | | - | |
3400 | | - | |
3401 | 3396 | | |
3402 | 3397 | | |
3403 | 3398 | | |
| |||
4027 | 4022 | | |
4028 | 4023 | | |
4029 | 4024 | | |
4030 | | - | |
| 4025 | + | |
4031 | 4026 | | |
4032 | 4027 | | |
4033 | 4028 | | |
| |||
4621 | 4616 | | |
4622 | 4617 | | |
4623 | 4618 | | |
4624 | | - | |
4625 | | - | |
| 4619 | + | |
4626 | 4620 | | |
4627 | 4621 | | |
4628 | 4622 | | |
4629 | | - | |
| 4623 | + | |
4630 | 4624 | | |
4631 | 4625 | | |
4632 | 4626 | | |
4633 | | - | |
4634 | | - | |
4635 | | - | |
| 4627 | + | |
4636 | 4628 | | |
4637 | 4629 | | |
4638 | 4630 | | |
| |||
4737 | 4729 | | |
4738 | 4730 | | |
4739 | 4731 | | |
4740 | | - | |
4741 | | - | |
4742 | | - | |
4743 | | - | |
| 4732 | + | |
4744 | 4733 | | |
4745 | 4734 | | |
4746 | 4735 | | |
4747 | | - | |
| 4736 | + | |
4748 | 4737 | | |
4749 | 4738 | | |
4750 | 4739 | | |
| |||
4766 | 4755 | | |
4767 | 4756 | | |
4768 | 4757 | | |
4769 | | - | |
4770 | | - | |
4771 | | - | |
4772 | | - | |
| 4758 | + | |
4773 | 4759 | | |
4774 | 4760 | | |
4775 | 4761 | | |
| |||
6447 | 6433 | | |
6448 | 6434 | | |
6449 | 6435 | | |
6450 | | - | |
6451 | | - | |
6452 | | - | |
6453 | 6436 | | |
6454 | 6437 | | |
6455 | 6438 | | |
| |||
7904 | 7887 | | |
7905 | 7888 | | |
7906 | 7889 | | |
7907 | | - | |
7908 | | - | |
7909 | | - | |
7910 | 7890 | | |
7911 | 7891 | | |
7912 | 7892 | | |
| |||
0 commit comments