Files
swift-mirror/test/Inputs/COM.swift
Saleem Abdulrasool 4ae91bec2c AST,Sema: synthesize IUnknown, ISwiftObject conformances
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.
2026-07-07 22:50:05 -07:00

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