mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When extending another module's type in your module, serialize declarations in the extension into the other module's "extension" symbol graph file, including relationships. This mechanic should continue up to the rootmost module. For example: A.AStruct <- B.BStruct < C.CStruct Both BStruct and CStruct should go in `@A` symbol graph files because AStruct owns BStruct and by extension owns CStruct. This is reflected in documentation curation in some form already. rdar://60796811
15 lines
239 B
Swift
15 lines
239 B
Swift
public protocol P {
|
|
associatedtype Thing
|
|
func foo() -> Thing
|
|
}
|
|
|
|
public struct AStruct<Thing>: P {
|
|
public var thing: Thing
|
|
public init(thing: Thing) {
|
|
self.thing = thing
|
|
}
|
|
public func foo() -> Thing {
|
|
return thing
|
|
}
|
|
}
|