mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When we want to figure out whether a `@_dynamicReplacement(for:)` decl should use native method replacement we need to check whether _the replaced decl_ is objc dynamic in a generic class. rdar://87428993
27 lines
392 B
Swift
27 lines
392 B
Swift
import Foundation
|
|
|
|
public class Generic<ItemType>: NSObject {
|
|
@objc public dynamic func foo() {}
|
|
|
|
@objc public dynamic var x: Int {
|
|
get {
|
|
return 0;
|
|
}
|
|
set {
|
|
print("noop")
|
|
}
|
|
}
|
|
|
|
@objc public dynamic var y: Int = 0
|
|
}
|
|
|
|
@objc
|
|
public protocol MyProto {
|
|
func doIt()
|
|
}
|
|
|
|
public final class MyGeneric<Item>: NSObject, MyProto {
|
|
public dynamic func doIt() {
|
|
}
|
|
}
|