mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -4057,6 +4057,10 @@ AnyFunctionType::Param swift::computeSelfParam(AbstractFunctionDecl *AFD,
|
||||
// The default flagless state.
|
||||
break;
|
||||
}
|
||||
|
||||
if (AFD->getAttrs().hasAttribute<AddressableSelfAttr>()) {
|
||||
flags = flags.withAddressable(true);
|
||||
}
|
||||
|
||||
return AnyFunctionType::Param(selfTy, Identifier(), flags);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user