mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When emitting accessor calls for keypaths, make sure that we reference protocol requirements that introduce witness table entries. Other protocol requirements don't have the necessary dispatch thunks, resulting in linker errors. Fixes rdar://problem/44187969.
20 lines
457 B
Swift
20 lines
457 B
Swift
public protocol OriginalGetter {
|
|
associatedtype Index
|
|
associatedtype Element
|
|
|
|
subscript (index: Index) -> Element { get }
|
|
}
|
|
|
|
public protocol OverridesGetter: OriginalGetter {
|
|
override subscript (index: Index) -> Element { get }
|
|
}
|
|
|
|
public protocol AddsSetter: OverridesGetter {
|
|
override subscript (index: Index) -> Element { get set }
|
|
}
|
|
|
|
public protocol OverridesSetter: AddsSetter {
|
|
override subscript (index: Index) -> Element { get set }
|
|
}
|
|
|