You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Elements. Unify interface-cycle handling for extension types
Unifies extension type cycle breaking with the existing
`breakInterfaceCycles()` flow used for other elements and removes the
bespoke walker in `summary2/extension_type.dart`. This consolidates the
logic and ensures consistent behavior across element kinds.
Key changes:
- Move `hasImplementsSelfReference` and
`hasRepresentationSelfReference` from fragments to
`ExtensionTypeElementImpl`. Flags are now owned and serialized by the
element.
- Update summary I/O: writer emits and reader consumes the flags at the
element level; fragment-level reads/writes are removed.
- Adjust `ErrorVerifier` to read flags via `fragment.element`.
- Handle extension types inside `interface_cycles.dart`: on an SCC,
mark `hasImplementsSelfReference` and replace `interfaces` with
`Object` or `Object?` depending on the representation’s nullability.
- Bump `DATA_VERSION` to 524 due to summary layout changes.
Why:
- Eliminates duplicate, divergent cycle-breaking logic for extension
types.
- Clarifies ownership of self-reference state and simplifies
serialization.
- Produces consistent diagnostics and interface normalization across
element kinds.
Impact:
- Requires a format bump; older summaries are invalidated as intended.
- Fragment-level self-reference bits are removed in favor of
element-level flags.
Change-Id: Ifabb0acb2ce60353bbfe10ee5877c0c66cee5202
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445961
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
0 commit comments