Skip to content

Commit 46bb45a

Browse files
committed
SwiftPrivate: add isClosed property
Since the `_FDOutputStream` type does not conform to a protocol, the required interface was missed. The changes in fbce6e7 introduced a use of the `isClosed` property which broke the Windows build. This should fix the windows build.
1 parent 9250e9f commit 46bb45a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

stdlib/private/SwiftPrivate/IO.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ public struct _Stderr : TextOutputStream {
161161
#if os(Windows)
162162
public struct _FDOutputStream : TextOutputStream {
163163
public var handle: HANDLE
164+
public var isClosed: Bool {
165+
return handle == INVALID_HANDLE_VALUE
166+
}
164167

165168
public init(handle: HANDLE) {
166169
self.handle = handle

0 commit comments

Comments
 (0)