Summary
When both a type A and its nested type A.B are generic, specializing A can cause the specialized entries for A.B to disappear from RuntimeViewer's sidebar/results.
Reproduction
- Open RuntimeViewer and inspect SwiftUI/SwiftUICore.
- Filter for
EventListenerPhase.
- Observe that both the parent type and nested types have generic/specialized entries, for example:
SwiftUI.EventListenerPhase
SwiftUI.EventListenerPhase.Value
SwiftUI.EventListenerPhase.Value<SwiftUI.SpatialEvent>
- Specialize the parent type, for example
SwiftUI.EventListenerPhase<SwiftUI.MouseEvent>.
- Re-check the nested generic/specialized entries under
SwiftUI.EventListenerPhase.Value.
Actual Behavior
After the parent generic type is specialized, nested generic specialization entries can be removed/hidden from the runtime object tree. In the observed case, specializing EventListenerPhase caused the previously visible specialized nested EventListenerPhase.Value<...> entry to disappear from the expected place.
Expected Behavior
Specializing A should not destroy or hide existing A.B specializations. Nested generic specializations should either remain visible under the nested generic declaration or be re-associated with the specialized parent in a predictable way.
Notes
Observed while inspecting SwiftUI/SwiftUICore on macOS with RuntimeViewer. The visible symptom is in the sidebar tree/search results, but the underlying issue may be in runtime object identity, specialization grouping, or tree diffing.
Summary
When both a type
Aand its nested typeA.Bare generic, specializingAcan cause the specialized entries forA.Bto disappear from RuntimeViewer's sidebar/results.Reproduction
EventListenerPhase.SwiftUI.EventListenerPhaseSwiftUI.EventListenerPhase.ValueSwiftUI.EventListenerPhase.Value<SwiftUI.SpatialEvent>SwiftUI.EventListenerPhase<SwiftUI.MouseEvent>.SwiftUI.EventListenerPhase.Value.Actual Behavior
After the parent generic type is specialized, nested generic specialization entries can be removed/hidden from the runtime object tree. In the observed case, specializing
EventListenerPhasecaused the previously visible specialized nestedEventListenerPhase.Value<...>entry to disappear from the expected place.Expected Behavior
Specializing
Ashould not destroy or hide existingA.Bspecializations. Nested generic specializations should either remain visible under the nested generic declaration or be re-associated with the specialized parent in a predictable way.Notes
Observed while inspecting SwiftUI/SwiftUICore on macOS with RuntimeViewer. The visible symptom is in the sidebar tree/search results, but the underlying issue may be in runtime object identity, specialization grouping, or tree diffing.