Skip to content

[stdlib] Use type inference for Bool vars #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions stdlib/private/SwiftPrivate/IO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import SwiftShims

public struct _FDInputStream {
public let fd: CInt
public var isClosed: Bool = false
public var isEOF: Bool = false
public var isClosed = false
public var isEOF = false
internal var _buffer = [UInt8](count: 256, repeatedValue: 0)
internal var _bufferUsed: Int = 0

Expand Down Expand Up @@ -93,7 +93,7 @@ public struct _Stderr : OutputStreamType {

public struct _FDOutputStream : OutputStreamType {
public let fd: CInt
public var isClosed: Bool = false
public var isClosed = false

public init(fd: CInt) {
self.fd = fd
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SDK/Foundation/Foundation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ public struct NSIndexSetGenerator : GeneratorType {
public typealias Element = Int

internal let _set: NSIndexSet
internal var _first: Bool = true
internal var _first = true
internal var _current: Int?

internal init(set: NSIndexSet) {
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/SDK/XCTest/XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public func XCTAssertEqualWithAccuracy<T : FloatingPointType>(@autoclosure expre
let expressionValue1 = expressionValue1Optional!
let expressionValue2 = expressionValue2Optional!

var equalWithAccuracy: Bool = false
var equalWithAccuracy = false

switch (expressionValue1, expressionValue2, accuracy) {
case let (expressionValue1Double as Double, expressionValue2Double as Double, accuracyDouble as Double):
Expand Down Expand Up @@ -668,7 +668,7 @@ public func XCTAssertNotEqualWithAccuracy<T : FloatingPointType>(@autoclosure ex
let expressionValue1 = expressionValue1Optional!
let expressionValue2 = expressionValue2Optional!

var notEqualWithAccuracy: Bool = false
var notEqualWithAccuracy = false

switch (expressionValue1, expressionValue2, accuracy) {
case let (expressionValue1Double as Double, expressionValue2Double as Double, accuracyDouble as Double):
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/Stride.swift
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public struct StrideThroughGenerator<Element : Strideable> : GeneratorType {
var current: Element
let end: Element
let stride: Element.Stride
var done: Bool = false
var done = false

/// Advance to the next element and return it, or `nil` if no next
/// element exists.
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/Zip.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public struct Zip2Generator<
}

internal var _baseStreams: (Generator1, Generator2)
internal var _reachedEnd: Bool = false
internal var _reachedEnd = false
}

/// A sequence of pairs built out of two underlying sequences, where
Expand Down