mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #78021 from jckarter/addressable-params-2
Add an `@_addressableSelf` attribute to mark the self param of methods as addressable.
This commit is contained in:
@@ -513,7 +513,11 @@ DECL_ATTR(lifetime, Lifetime,
|
||||
OnAccessor | OnConstructor | OnFunc | OnSubscript | LongAttribute | ABIBreakingToAdd | ABIStableToRemove | APIBreakingToAdd | APIStableToRemove | AllowMultipleAttributes,
|
||||
161)
|
||||
|
||||
LAST_DECL_ATTR(Lifetime)
|
||||
SIMPLE_DECL_ATTR(_addressableSelf, AddressableSelf,
|
||||
OnAccessor | OnConstructor | OnFunc | OnSubscript | ABIBreakingToAdd | ABIStableToRemove | APIBreakingToAdd | APIStableToRemove | UserInaccessible,
|
||||
162)
|
||||
|
||||
LAST_DECL_ATTR(AddressableSelf)
|
||||
|
||||
#undef DECL_ATTR_ALIAS
|
||||
#undef CONTEXTUAL_DECL_ATTR_ALIAS
|
||||
|
||||
@@ -309,6 +309,11 @@ ERROR(incorrect_explicit_closure_result_vs_return_type,none,
|
||||
"declared closure result %0 is incompatible with return type %1",
|
||||
(Type, Type))
|
||||
|
||||
ERROR(addressable_not_enabled,none,
|
||||
"@_addressable is an experimental feature", ())
|
||||
ERROR(addressableSelf_not_on_method,none,
|
||||
"@_addressableSelf cannot be applied to non-member declarations", ())
|
||||
|
||||
ERROR(unsupported_closure_attr,none,
|
||||
"%select{attribute |}0 '%1' is not supported on a closure",
|
||||
(bool, StringRef))
|
||||
|
||||
Reference in New Issue
Block a user