Skip to content

Conversation

hamishknight
Copy link
Contributor

We don't properly support peer declarations in local contexts, as such if we have both a property wrapper and macro with a given name on a local var, let's prefer the property wrapper.

rdar://148782639

Introduce CustomAttrOwner that can store either a Decl for an
attached attribute, or a DeclContext for e.g a type or closure
attribute. Store this on CustomAttr such that we can query it from
the name lookup requests.
We don't properly support peer declarations in local contexts, as such
if we have both a property wrapper and macro with a given name on a
local var, let's prefer the property wrapper.

rdar://148782639
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please test source compatibility

@hamishknight hamishknight merged commit 7fe655d into swiftlang:main Oct 14, 2025
7 checks passed
@hamishknight hamishknight deleted the wrapping-paper branch October 14, 2025 10:57
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