Files
swift-mirror/test/SILGen/Inputs/objc_dynamic_replacement_ext.swift
Arnold Schwaighofer 1447cde65f AST: Fix ValueDecl::isNativeMethodReplacement
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
2022-01-24 14:19:21 -08:00

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() {
}
}