Skip to content

Commit c482d3d

Browse files
committed
Block: adjust the type constructor for Windows
We need to add in the `rawValue:` label when constructing the types as identified by the compiler.
1 parent e805fc4 commit c482d3d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/swift/Block.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class DispatchWorkItem {
4141

4242
public init(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], block: @escaping @convention(block) () -> ()) {
4343
#if os(Windows) && (arch(arm64) || arch(x86_64))
44-
let flags = dispatch_block_flags_t(UInt32(flags.rawValue))
44+
let flags = dispatch_block_flags_t(rawValue: UInt32(flags.rawValue))
4545
#else
4646
let flags: dispatch_block_flags_t = numericCast(flags.rawValue)
4747
#endif
@@ -53,7 +53,7 @@ public class DispatchWorkItem {
5353
// dispatch_block_t, as we know the lifetime of the block in question.
5454
internal init(flags: DispatchWorkItemFlags = [], noescapeBlock: () -> ()) {
5555
#if os(Windows) && (arch(arm64) || arch(x86_64))
56-
let flags = dispatch_block_flags_t(UInt32(flags.rawValue))
56+
let flags = dispatch_block_flags_t(rawValue: UInt32(flags.rawValue))
5757
#else
5858
let flags: dispatch_block_flags_t = numericCast(flags.rawValue)
5959
#endif

0 commit comments

Comments
 (0)