mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Allow retain/release operations to be methods
Some foreign reference types such as IUnknown define retain/release operations as methods of the type.
Previously Swift only supported retain/release operations as standalone functions.
The syntax for member functions would be `SWIFT_SHARED_REFERENCE(.doRetain, .doRelease)`.
rdar://160696723
(cherry picked from commit e78ce6165f)
This commit is contained in:
@@ -265,6 +265,9 @@ ERROR(foreign_reference_types_release_non_void_return_type, none,
|
||||
ERROR(foreign_reference_types_retain_release_not_a_function_decl, none,
|
||||
"specified %select{retain|release}0 function '%1' is not a function",
|
||||
(bool, StringRef))
|
||||
ERROR(foreign_reference_types_retain_release_not_an_instance_function, none,
|
||||
"specified %select{retain|release}0 function '%1' is a static function; expected an instance function",
|
||||
(bool, StringRef))
|
||||
ERROR(conforms_to_missing_dot, none,
|
||||
"expected module name and protocol name separated by '.' in protocol "
|
||||
"conformance; '%0' is invalid",
|
||||
|
||||
Reference in New Issue
Block a user