mirror of
https://github.com/safishamsi/graphify.git
synced 2026-07-13 10:57:13 +00:00
ad7015262b
The Swift `enum_entry` handler in `_swift_extra_walk` iterated the entry's children only for the `simple_identifier` case name (emitting a `case_of` edge) and never descended into the sibling `enum_type_parameters` node, where associated-value types live (`enum_type_parameters -> user_type -> type_identifier`). As a result `case started(Session)` silently dropped the `Event -> Session` type reference. Descend into each `enum_type_parameters` child after emitting `case_of`, run `_swift_collect_type_refs` over its named children, and emit a `references` edge from the enum node to each collected type (context `type`, or `generic_arg` for generic roles), guarding target != enum node. Mirrors the existing Swift property/parameter/return-type emit style. Fixture: add `case failed(Config)` to `NetworkError` in sample.swift. Test: assert (`NetworkError`, `Config`) in references(context=type).