Skip to content

[Feature] Improve handling of conditionally compiled associated types #139

Description

@graycampbell

Use Case

Complex usages of conditionally compiled associated types

Feature Proposal

There are still some issues with how conditionally compiled associated types are handled:

  • Multiple independent top-level #if blocks with constrained associated types
    • Correct handling requires combining constraints across all active branches to avoid duplicate protocol conformances.
  • Nested #if blocks containing associated types
    • Supporting this correctly requires recursive traversal and per-configuration constraint aggregation.
  • Cross-branch semantic equivalence of constraints
    • The macro does not attempt to detect when constraints are semantically identical but syntactically different (e.g. Equatable & Hashable vs Hashable & Equatable)

Alternatives Considered

No response

Additional Context

Successor to issue #136. Some handling of conditionally compiled associated types was added in #137 with these known limitations.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions