Skip to content

Categorize associatedtype declarations as beforeMarks - #2668

Draft
calda with Copilot wants to merge 1 commit into
developfrom
copilot/change-associatedtype-declarations
Draft

Categorize associatedtype declarations as beforeMarks#2668
calda with Copilot wants to merge 1 commit into
developfrom
copilot/change-associatedtype-declarations

Conversation

Copilot AI commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

associatedtype declarations were categorized as .nestedType, causing organizeDeclarations to sort them after init declarations in protocol bodies. They should be .beforeMarks so they always appear first.

  • Split the combined "typealias", "associatedtype" case in DeclarationType.swift so that associatedtype returns .beforeMarks while typealias remains .nestedType.
// Before
case "typealias", "associatedtype":
    return .nestedType

// After
case "typealias":
    return .nestedType

case "associatedtype":
    return .beforeMarks

…edType

Co-authored-by: calda <1811727+calda@users.noreply.github.com>
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.45%. Comparing base (960a338) to head (e6967c6).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2668   +/-   ##
========================================
  Coverage    95.45%   95.45%           
========================================
  Files          178      178           
  Lines        27226    27228    +2     
========================================
+ Hits         25989    25991    +2     
  Misses        1237     1237           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants