mirror of
https://github.com/apple/swift.git
synced 2026-11-04 00:12:11 +01:00
Add synthesis of the protocol conformances for the known protocols with `@com`. `ISwiftObject` may not be explicitly conformed to, it is a purely compiler managed sealed protocol. Generate a diagnostic for the explicit conformance.
24 lines
674 B
Swift
24 lines
674 B
Swift
public struct GUID {
|
|
public var data1: UInt32
|
|
public var data2: UInt16
|
|
public var data3: UInt16
|
|
public var data4: (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)
|
|
|
|
public init(data1: UInt32, data2: UInt16, data3: UInt16,
|
|
data4: (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)) {
|
|
self.data1 = data1
|
|
self.data2 = data2
|
|
self.data3 = data3
|
|
self.data4 = data4
|
|
}
|
|
}
|
|
|
|
public typealias IID = GUID
|
|
public typealias CLSID = GUID
|
|
|
|
@com(interface: "00000000-0000-0000-C000-000000000046")
|
|
public protocol IUnknown: AnyObject { }
|
|
|
|
@com(interface: "8e369447-5188-5ada-b9ec-8fcb732d226b")
|
|
public protocol ISwiftObject: IUnknown { }
|