Skip to content

fix(minor): Recognize actor-annotated closures in macro validation - #36

Merged
supersonicbyte merged 1 commit into
ordo-one:mainfrom
dolapo:dolapo/attribute-type-syntax
Apr 22, 2026
Merged

supersonicbyte merged 1 commit into
ordo-one:mainfrom
dolapo:dolapo/attribute-type-syntax

Conversation

@dolapo

@dolapo dolapo commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Unwrap AttributedTypeSyntax in isClosure(type:) so actor-annotated closures are recognized consistently across Equatable macros.

Behavior change:

  • @EquatableIgnored rejects actor-annotated closures
  • @Equatable diagnoses unignored actor-annotated closures
  • @EquatableIgnoredUnsafeClosure accepts actor-annotated closures

Description

Include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

How Has This Been Tested?

  • Ran swift test
  • Added regression tests covering anew cases:
    • @EquatableIgnored on @MainActor () -> Void
    • @Equatable on (@MainActor () -> Void)?
    • @EquatableIgnoredUnsafeClosure on (@MainActor () -> Void)?

Minimal checklist:

  • [x ] I have performed a self-review of my own code
  • [ ] I have added DocC code-level documentation for any public interfaces exported by the package
  • [ x] I have added unit and/or integration tests that prove my fix is effective or that my feature works

Unwrap AttributedTypeSyntax in isClosure(type:) so actor-annotated closures are recognized consistently across Equatable macros.

Behavior change:
- @EquatableIgnored rejects actor-annotated closures
- @Equatable diagnoses unignored actor-annotated closures
- @EquatableIgnoredUnsafeClosure accepts actor-annotated closures
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@dolapo dolapo changed the title Recognize actor-annotated closures in macro validation fix: Recognize actor-annotated closures in macro validation Apr 21, 2026
@codecov

codecov Bot commented Apr 22, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.60%. Comparing base (564182f) to head (4054116).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   90.42%   93.60%   +3.18%     
==========================================
  Files          16       16              
  Lines         355      500     +145     
==========================================
+ Hits          321      468     +147     
+ Misses         34       32       -2     
Files with missing lines Coverage Δ
Sources/EquatableMacros/Closure.swift 95.00% <100.00%> (+6.11%) ⬆️

... and 14 files with indirect coverage changes

Files with missing lines Coverage Δ
Sources/EquatableMacros/Closure.swift 95.00% <100.00%> (+6.11%) ⬆️

... and 14 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 564182f...4054116. Read the comment docs.

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

@supersonicbyte supersonicbyte changed the title fix: Recognize actor-annotated closures in macro validation fix(minor): Recognize actor-annotated closures in macro validation Apr 22, 2026

@supersonicbyte supersonicbyte left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for contributing 🚀

@supersonicbyte
supersonicbyte merged commit c0f1c48 into ordo-one:main Apr 22, 2026
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants