You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[5.3] Mark non-foreign entry points of @objc dynamic methods in generic classes dynamically_replaceable
```
* Description:
class Generic<T> {
@objc dynamic func method() {}
}
extension Generic {
@_dynamicReplacement(for:method())
func replacement() {}
}
```
The standard mechanism of using Objective-C categories for dynamically
replacing @objc methods in generic classes does not work.
Instead we mark the native entry point as replaceable.
Because this affects all @objc methods in generic classes (whether there
is a replacement or not) by making the native entry point
`[dynamically_replaceable]` (regardless of optimization mode) we guard this by
the -enable-implicit-dynamic flag because we are late in the release cycle.
* Scope: Before this patch @_dynamicReplacement(for:) was not allowed on
objective c methods in generic classes.
* Risk: Medium. Should only affect entry points that did not work before.
* Reviewed by: Slava Pestov
* Testing: Regression test added
rdar://63679357
0 commit comments