Skip to content

Commit be13b47

Browse files
author
Matt Zanchelli
committed
Fix typos
becuase -> because preceeds -> precedes initalizer -> initializer intialize -> initialize libary -> library notfication -> notification reciever -> receiver collecton -> collection exlcusive -> exclusive techincal -> technical compatability -> compatibility setps -> steps accomodate -> accommodate brakcet -> bracket fraciton -> fraction programm -> program concequently -> consequently ecoding -> encoding timeIntervalforSelfEnd -> timeIntervalForSelfEnd
1 parent 75814e9 commit be13b47

24 files changed

+35
-35
lines changed

lib/AST/Attr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ bool DeclAttribute::printImpl(ASTPrinter &Printer, const PrintOptions &Options,
721721
// if the overriden decl is invisible from the interface. Otherwise, an error
722722
// will occur while building the Swift module because the overriding decl
723723
// doesn't override anything.
724-
// We couldn't skip every `override` keywords becuase they change the
724+
// We couldn't skip every `override` keywords because they change the
725725
// ABI if the overriden decl is also publically visible.
726726
// For public-override-internal case, having `override` doesn't have ABI
727727
// implication. Thus we can skip them.

stdlib/public/Darwin/Foundation/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ internal final class __DataStorage {
183183
@inlinable // This is inlinable as trivially computable.
184184
var isExternallyOwned: Bool {
185185
// all __DataStorages will have some sort of capacity, because empty cases hit the .empty enum _Representation
186-
// anything with 0 capacity means that we have not allocated this pointer and concequently mutation is not ours to make.
186+
// anything with 0 capacity means that we have not allocated this pointer and consequently mutation is not ours to make.
187187
return _capacity == 0
188188
}
189189

stdlib/public/Darwin/Foundation/DateInterval.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ public struct DateInterval : ReferenceConvertible, Comparable, Hashable, Codable
145145
public func contains(_ date: Date) -> Bool {
146146
let timeIntervalForGivenDate = date.timeIntervalSinceReferenceDate
147147
let timeIntervalForSelfStart = start.timeIntervalSinceReferenceDate
148-
let timeIntervalforSelfEnd = end.timeIntervalSinceReferenceDate
149-
if (timeIntervalForGivenDate >= timeIntervalForSelfStart) && (timeIntervalForGivenDate <= timeIntervalforSelfEnd) {
148+
let timeIntervalForSelfEnd = end.timeIntervalSinceReferenceDate
149+
if (timeIntervalForGivenDate >= timeIntervalForSelfStart) && (timeIntervalForGivenDate <= timeIntervalForSelfEnd) {
150150
return true
151151
}
152152
return false

stdlib/public/Darwin/Foundation/NSStringAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ extension String {
205205
///
206206
/// - Parameters:
207207
/// - bytes: A sequence of bytes to interpret using `encoding`.
208-
/// - encoding: The ecoding to use to interpret `bytes`.
208+
/// - encoding: The encoding to use to interpret `bytes`.
209209
public init?<S: Sequence>(bytes: __shared S, encoding: Encoding)
210210
where S.Iterator.Element == UInt8 {
211211
let byteArray = Array(bytes)

stdlib/public/Darwin/Foundation/Publishers+NotificationCenter.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension NotificationCenter {
2222
///
2323
/// - Parameters:
2424
/// - name: The name of the notification to publish.
25-
/// - object: The object posting the named notfication. If `nil`, the publisher emits elements for any object producing a notification with the given name.
25+
/// - object: The object posting the named notification. If `nil`, the publisher emits elements for any object producing a notification with the given name.
2626
/// - Returns: A publisher that emits events when broadcasting notifications.
2727
public func publisher(
2828
for name: Notification.Name,
@@ -43,15 +43,15 @@ extension NotificationCenter {
4343
public let center: NotificationCenter
4444
/// The name of notifications published by this publisher.
4545
public let name: Notification.Name
46-
/// The object posting the named notfication.
46+
/// The object posting the named notification.
4747
public let object: AnyObject?
4848

4949
/// Creates a publisher that emits events when broadcasting notifications.
5050
///
5151
/// - Parameters:
5252
/// - center: The notification center to publish notifications for.
5353
/// - name: The name of the notification to publish.
54-
/// - object: The object posting the named notfication. If `nil`, the publisher emits elements for any object producing a notification with the given name.
54+
/// - object: The object posting the named notification. If `nil`, the publisher emits elements for any object producing a notification with the given name.
5555
public init(center: NotificationCenter, name: Notification.Name, object: AnyObject? = nil) {
5656
self.center = center
5757
self.name = name

stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Swift
1515

1616
// =============================================================================
1717
// Definitions of proxy functions that mimic a generic function signature in the
18-
// standard library and are annotated with the standard libary's
18+
// standard library and are annotated with the standard library's
1919
// actual generic function name. The "prespecialize" annotation forces
2020
// the actual generic function to be specialized based on the argument
2121
// types passed to the proxy function.

stdlib/public/core/Array.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ extension Array: RangeReplaceableCollection {
11111111
internal mutating func _reserveCapacityAssumingUniqueBuffer(oldCount: Int) {
11121112
// Due to make_mutable hoisting the situation can arise where we hoist
11131113
// _makeMutableAndUnique out of loop and use it to replace
1114-
// _makeUniqueAndReserveCapacityIfNotUnique that preceeds this call. If the
1114+
// _makeUniqueAndReserveCapacityIfNotUnique that precedes this call. If the
11151115
// array was empty _makeMutableAndUnique does not replace the empty array
11161116
// buffer by a unique buffer (it just replaces it by the empty array
11171117
// singleton).

stdlib/public/core/ArraySlice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ extension ArraySlice: RangeReplaceableCollection {
867867
internal mutating func _reserveCapacityAssumingUniqueBuffer(oldCount: Int) {
868868
// Due to make_mutable hoisting the situation can arise where we hoist
869869
// _makeMutableAndUnique out of loop and use it to replace
870-
// _makeUniqueAndReserveCapacityIfNotUnique that preceeds this call. If the
870+
// _makeUniqueAndReserveCapacityIfNotUnique that precedes this call. If the
871871
// array was empty _makeMutableAndUnique does not replace the empty array
872872
// buffer by a unique buffer (it just replaces it by the empty array
873873
// singleton).

stdlib/public/core/Character.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ extension Character :
145145

146146
/// Creates a character with the specified value.
147147
///
148-
/// Do not call this initalizer directly. It is used by the compiler when
148+
/// Do not call this initializer directly. It is used by the compiler when
149149
/// you use a string literal to initialize a `Character` instance. For
150150
/// example:
151151
///

stdlib/public/core/ContiguousArray.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ extension ContiguousArray: RangeReplaceableCollection {
746746
internal mutating func _reserveCapacityAssumingUniqueBuffer(oldCount: Int) {
747747
// Due to make_mutable hoisting the situation can arise where we hoist
748748
// _makeMutableAndUnique out of loop and use it to replace
749-
// _makeUniqueAndReserveCapacityIfNotUnique that preceeds this call. If the
749+
// _makeUniqueAndReserveCapacityIfNotUnique that precedes this call. If the
750750
// array was empty _makeMutableAndUnique does not replace the empty array
751751
// buffer by a unique buffer (it just replaces it by the empty array
752752
// singleton).

stdlib/public/core/DictionaryBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension Dictionary {
4949
///
5050
/// Foundation uses this initializer to bridge the contents of an NSDictionary
5151
/// instance without allocating a pair of intermediary buffers. Pass the
52-
/// required capacity and a closure that can intialize the dictionary's
52+
/// required capacity and a closure that can initialize the dictionary's
5353
/// elements. The closure must return `c`, the number of initialized elements
5454
/// in both buffers, such that the elements in the range `0..<c` are
5555
/// initialized and the elements in the range `c..<capacity` are

stdlib/public/core/Diffing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ extension BidirectionalCollection {
136136
/// - areEquivalent: A closure that returns a Boolean value indicating
137137
/// whether two elements are equivalent.
138138
///
139-
/// - Returns: The difference needed to produce the reciever's state from
139+
/// - Returns: The difference needed to produce the receiver's state from
140140
/// the parameter's state.
141141
///
142142
/// - Complexity: Worst case performance is O(*n* * *m*), where *n* is the

stdlib/public/core/EitherSequence.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ extension _EitherCollection: Collection {
107107
switch (self,position) {
108108
case let (.left(s),.left(i)): return s[i]
109109
case let (.right(s),.right(i)): return s[i]
110-
default: fatalError("_EitherCollecton: Sequence used with other index type")
110+
default: fatalError("_EitherCollection: Sequence used with other index type")
111111
}
112112
}
113113

114114
internal func index(after i: Index) -> Index {
115115
switch (self,i) {
116116
case let (.left(s),.left(i)): return .left(s.index(after: i))
117117
case let (.right(s),.right(i)): return .right(s.index(after: i))
118-
default: fatalError("_EitherCollecton: wrong type of index used")
118+
default: fatalError("_EitherCollection: wrong type of index used")
119119
}
120120
}
121121

@@ -129,15 +129,15 @@ extension _EitherCollection: Collection {
129129
return s.index(i, offsetBy: distance, limitedBy: limit).map { .left($0) }
130130
case let (.right(s),.right(i),.right(limit)):
131131
return s.index(i, offsetBy: distance, limitedBy: limit).map { .right($0) }
132-
default: fatalError("_EitherCollecton: wrong type of index used")
132+
default: fatalError("_EitherCollection: wrong type of index used")
133133
}
134134
}
135135

136136
internal func index(_ i: Index, offsetBy distance: Int) -> Index {
137137
switch (self,i) {
138138
case let (.left(s),.left(i)): return .left(s.index(i, offsetBy: distance))
139139
case let (.right(s),.right(i)): return .right(s.index(i, offsetBy: distance))
140-
default: fatalError("_EitherCollecton: wrong type of index used")
140+
default: fatalError("_EitherCollection: wrong type of index used")
141141
}
142142
}
143143

@@ -147,7 +147,7 @@ extension _EitherCollection: Collection {
147147
return s.distance(from: i, to: j)
148148
case let (.right(s),.right(i),.right(j)):
149149
return s.distance(from: i, to: j)
150-
default: fatalError("_EitherCollecton: wrong type of index used")
150+
default: fatalError("_EitherCollection: wrong type of index used")
151151
}
152152
}
153153
}
@@ -161,7 +161,7 @@ extension _EitherBidirectionalCollection: BidirectionalCollection {
161161
switch (self,i) {
162162
case let (.left(s),.left(i)): return .left(s.index(before: i))
163163
case let (.right(s),.right(i)): return .right(s.index(before: i))
164-
default: fatalError("_EitherCollecton: wrong type of index used")
164+
default: fatalError("_EitherCollection: wrong type of index used")
165165
}
166166
}
167167
}

stdlib/public/core/Filter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ extension LazyFilterCollection: Collection {
187187
internal func _ensureBidirectional(step: Int) {
188188
// FIXME: This seems to be the best way of checking whether _base is
189189
// forward only without adding an extra protocol requirement.
190-
// index(_:offsetBy:limitedBy:) is chosen becuase it is supposed to return
190+
// index(_:offsetBy:limitedBy:) is chosen because it is supposed to return
191191
// nil when the resulting index lands outside the collection boundaries,
192192
// and therefore likely does not trap in these cases.
193193
if step < 0 {

stdlib/public/core/Flatten.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ extension FlattenCollection: Collection {
328328
internal func _ensureBidirectional(step: Int) {
329329
// FIXME: This seems to be the best way of checking whether _base is
330330
// forward only without adding an extra protocol requirement.
331-
// index(_:offsetBy:limitedBy:) is chosen becuase it is supposed to return
331+
// index(_:offsetBy:limitedBy:) is chosen because it is supposed to return
332332
// nil when the resulting index lands outside the collection boundaries,
333333
// and therefore likely does not trap in these cases.
334334
if step < 0 {

stdlib/public/core/KeyPath.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ internal enum KeyPathComponent: Hashable {
748748
internal final class ClassHolder<ProjectionType> {
749749

750750
/// The type of the scratch record passed to the runtime to record
751-
/// accesses to guarantee exlcusive access.
751+
/// accesses to guarantee exclusive access.
752752
internal typealias AccessRecord = Builtin.UnsafeValueBuffer
753753

754754
internal var previous: AnyObject?

stdlib/public/core/LegacyABI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extension String {
8282

8383
extension String.UTF16View {
8484
// Swift 5.x: This was accidentally shipped as inlinable, but was never used
85-
// from an inlinable context. The definition is kept around for techincal ABI
85+
// from an inlinable context. The definition is kept around for technical ABI
8686
// compatibility (even though it shouldn't matter), but is unused.
8787
@inlinable @inline(__always)
8888
internal var _shortHeuristic: Int { return 32 }

stdlib/public/core/Sequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ extension IteratorSequence: IteratorProtocol, Sequence {
11591159
}
11601160
}
11611161

1162-
/* FIXME: ideally for compatability we would declare
1162+
/* FIXME: ideally for compatibility we would declare
11631163
extension Sequence {
11641164
@available(swift, deprecated: 5, message: "")
11651165
public typealias SubSequence = AnySequence<Element>

stdlib/public/core/Slice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
///
3232
/// You're tasked with finding the day with the most absences in the second
3333
/// half of the session. To find the index of the day in question, follow
34-
/// these setps:
34+
/// these steps:
3535
///
3636
/// 1) Create a slice of the `absences` array that holds the second half of the
3737
/// days.

stdlib/public/core/StringGutsRangeReplaceable.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ extension _StringGuts {
7171
self.grow(n) // TODO: no factor should be applied
7272
}
7373

74-
// Grow to accomodate at least `n` code units
74+
// Grow to accommodate at least `n` code units
7575
@usableFromInline
7676
internal mutating func grow(_ n: Int) {
7777
defer { self._invariantCheck() }
7878

7979
_internalInvariant(
8080
self.uniqueNativeCapacity == nil || self.uniqueNativeCapacity! < n)
8181

82-
// TODO: Dont' do this! Growth should only happen for append...
82+
// TODO: Don't do this! Growth should only happen for append...
8383
let growthTarget = Swift.max(n, (self.uniqueNativeCapacity ?? 0) * 2)
8484

8585
if _fastPath(isFastUTF8) {
@@ -122,7 +122,7 @@ extension _StringGuts {
122122
"growth should produce enough capacity")
123123
}
124124

125-
// See if we can accomodate without growing or copying. If we have
125+
// See if we can accommodate without growing or copying. If we have
126126
// sufficient capacity, we do not need to grow, and we can skip the copy if
127127
// unique. Otherwise, growth is required.
128128
let sufficientCapacity: Bool

stdlib/public/core/StringRangeReplaceableCollection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extension String: RangeReplaceableCollection {
3131
self.init(repeating: repeatedValue._str, count: count)
3232
}
3333

34-
// This initializer disambiguates between the following intitializers, now
34+
// This initializer disambiguates between the following initializers, now
3535
// that String conforms to Collection:
3636
// - init<T>(_ value: T) where T: LosslessStringConvertible
3737
// - init<S>(_ characters: S) where S: Sequence, S.Element == Character

stdlib/public/core/UnicodeScalarProperties.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ extension Unicode.Scalar.Properties {
11561156
/// The name of a scalar is immutable and never changed in future versions of
11571157
/// the Unicode Standard. The `nameAlias` property is provided to issue
11581158
/// corrections if a name was issued erroneously. For example, the `name` of
1159-
/// U+FE18 is "PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET"
1159+
/// U+FE18 is "PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET"
11601160
/// (note that "BRACKET" is misspelled). The `nameAlias` property then
11611161
/// contains the corrected name.
11621162
///
@@ -1356,7 +1356,7 @@ extension Unicode {
13561356
/// type or a non-digit numeric value.
13571357
///
13581358
/// This numeric type includes fractions such as "⅕" (U+2155 VULGAR
1359-
/// FRACITON ONE FIFTH), numerical CJK ideographs like "兆" (U+5146 CJK
1359+
/// FRACTION ONE FIFTH), numerical CJK ideographs like "兆" (U+5146 CJK
13601360
/// UNIFIED IDEOGRAPH-5146), and other scalars that are not decimal digits
13611361
/// used positionally in the writing of base-10 numbers.
13621362
///

stdlib/public/core/Unmanaged.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public struct Unmanaged<Instance: AnyObject> {
124124
/// Violation of this will incur undefined behavior.
125125
///
126126
/// A lifetime of a reference 'the instance' is fixed over a point in the
127-
/// programm if:
127+
/// program if:
128128
///
129129
/// * There exists a global variable that references 'the instance'.
130130
///

tools/swift-api-digester/ModuleAnalyzerNodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ enum class NodeMatchReason: uint8_t {
105105
// The second node is missing.
106106
Removed,
107107

108-
// The nodes are considered a pair becuase they have same/similar name.
108+
// The nodes are considered a pair because they have same/similar name.
109109
Name,
110110

111111
// The nodes are matched because they're in the same order, e.g. ith child of

0 commit comments

Comments
 (0)