Skip to content

Commit c9c295a

Browse files
authored
Merge pull request swiftlang#32727 from valeriyvan/snippetbool
2 parents 7d6abb8 + b7076e4 commit c9c295a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/core/Bool.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
/// print(i)
4444
/// i -= 1
4545
/// }
46-
/// // error: 'Int' is not convertible to 'Bool'
46+
/// // error: Cannot convert value of type 'Int' to expected condition type 'Bool'
4747
///
4848
/// The correct approach in Swift is to compare the `i` value with zero in the
4949
/// `while` statement.
@@ -254,7 +254,7 @@ extension Bool {
254254
/// `lhs` evaluates to `true`. For example:
255255
///
256256
/// let measurements = [7.44, 6.51, 4.74, 5.88, 6.27, 6.12, 7.76]
257-
/// let sum = measurements.reduce(0, combine: +)
257+
/// let sum = measurements.reduce(0, +)
258258
///
259259
/// if measurements.count > 0 && sum / Double(measurements.count) < 6.5 {
260260
/// print("Average measurement is less than 6.5")

0 commit comments

Comments
 (0)