Skip to content

Commit ebc4e60

Browse files
authored
Spelling decl (#42550)
* spelling: adjacent Signed-off-by: Josh Soref <[email protected]> * spelling: ambiguous Signed-off-by: Josh Soref <[email protected]> * spelling: captures Signed-off-by: Josh Soref <[email protected]> * spelling: effectful Signed-off-by: Josh Soref <[email protected]> * spelling: nonoverride Signed-off-by: Josh Soref <[email protected]> * spelling: ouroboros Signed-off-by: Josh Soref <[email protected]> * spelling: overridden Signed-off-by: Josh Soref <[email protected]> * spelling: qualified Signed-off-by: Josh Soref <[email protected]> * spelling: received Signed-off-by: Josh Soref <[email protected]> * spelling: refinement Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 8b89b4c commit ebc4e60

13 files changed

+26
-26
lines changed

test/decl/func/operator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func ??= <T>(result : inout T?, rhs : Int) { // ok
201201

202202

203203

204-
// <rdar://problem/14296004> [QoI] Poor diagnostic/recovery when two operators (e.g., == and -) are adjacted without spaces.
204+
// <rdar://problem/14296004> [QoI] Poor diagnostic/recovery when two operators (e.g., == and -) are adjacent without spaces.
205205
_ = n*-4 // expected-error {{missing whitespace between '*' and '-' operators}} {{6-6= }} {{7-7= }}
206206
if n==-1 {} // expected-error {{missing whitespace between '==' and '-' operators}} {{5-5= }} {{7-7= }}
207207

test/decl/operator/lookup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func testOperatorLookup() {
9696
// through ExportsAC.
9797
>>>1
9898

99-
// We've been evil and overriden TernaryPrecedence in both modules A and B.
99+
// We've been evil and overridden TernaryPrecedence in both modules A and B.
100100
// Make sure we emit an ambiguity error without emitting a 'broken stdlib'
101101
// error.
102102
true ? () : () // expected-error {{multiple precedence groups found}}

test/decl/operator/lookup_compatibility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func testOperatorLookup() {
105105
// through ExportsAC.
106106
>>>1
107107

108-
// We've been evil and overriden TernaryPrecedence in both modules A and B.
108+
// We've been evil and overridden TernaryPrecedence in both modules A and B.
109109
// Make sure we emit an ambiguity error without emitting a 'broken stdlib'
110110
// error.
111111
true ? () : () // expected-error {{multiple precedence groups found}}

test/decl/protocol/conforms/Inputs/fixit_stub_ambiguity_module.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
public struct Notification {}
22

33
public protocol AmbiguousFuncProtocol {
4-
func application(recieved: Notification)
4+
func application(received: Notification)
55
}
66

77
public protocol AmbiguousVarProtocol {

test/decl/protocol/conforms/error_self_conformance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ func testSimple(error: Error) {
99
}
1010

1111
protocol ErrorRefinement : Error {}
12-
func testErrorRefinment(error: ErrorRefinement) {
12+
func testErrorRefinement(error: ErrorRefinement) {
1313
opensError(error) // okay
1414
wantsError(error, error) // expected-error {{type 'any ErrorRefinement' cannot conform to 'Error'}} expected-note {{only concrete types such as structs, enums and classes can conform to protocols}}
1515
}

test/decl/protocol/conforms/fixit_stub_editor_amiguity.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct Notification {}
99

1010
struct MyApp: AmbiguousFuncProtocol {
1111
// expected-error@-1 {{type 'MyApp' does not conform to protocol 'AmbiguousFuncProtocol'}}
12-
// expected-note@-2 {{do you want to add protocol stubs?}} {{38-38=\n func application(recieved: Ambiguous.Notification) {\n <#code#>\n \}\n}}
12+
// expected-note@-2 {{do you want to add protocol stubs?}} {{38-38=\n func application(received: Ambiguous.Notification) {\n <#code#>\n \}\n}}
1313
}
1414

1515
extension MyApp: AmbiguousVarProtocol {

test/decl/protocol/protocol_with_superclass.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ protocol DuplicateSuper : Concrete, Concrete {}
326326
// expected-warning@-1 {{redundant superclass constraint 'Self' : 'Concrete'}}
327327
// expected-error@-2 {{duplicate inheritance from 'Concrete'}}
328328

329-
// Ambigous name lookup situation
329+
// Ambiguous name lookup situation
330330
protocol Amb : Concrete {}
331331
// expected-note@-1 {{'Amb' previously declared here}}
332332
// expected-note@-2 {{found this candidate}}

test/decl/protocol/recursive_requirement.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ protocol Foo {
66
associatedtype Bar : Foo
77
}
88

9-
struct Oroborous : Foo {
10-
typealias Bar = Oroborous
9+
struct Ouroboros : Foo {
10+
typealias Bar = Ouroboros
1111
}
1212

1313
// -----

test/decl/protocol/special/coding/class_codable_member_type_lookup.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct SynthesizedClass : Codable {
1818
// Qualified type lookup should always be unambiguous.
1919
public func qualifiedFoo(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared public because its parameter uses a private type}}
2020
internal func qualifiedBar(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
21-
fileprivate func qualfiedBaz(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
21+
fileprivate func qualifiedBaz(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
2222
private func qualifiedQux(_ key: SynthesizedClass.CodingKeys) {}
2323

2424
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -97,7 +97,7 @@ struct SynthesizedClass : Codable {
9797
// Qualified lookup should remain as-is.
9898
public func qualifiedFoo(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared public because its parameter uses a private type}}
9999
internal func qualifiedBar(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
100-
fileprivate func qualfiedBaz(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
100+
fileprivate func qualifiedBaz(_ key: SynthesizedClass.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
101101
private func qualifiedQux(_ key: SynthesizedClass.CodingKeys) {}
102102

103103
// Unqualified lookups should find the SynthesizedClass's synthesized
@@ -186,7 +186,7 @@ struct NonSynthesizedClass : Codable { // expected-note 4 {{'NonSynthesizedClass
186186
// type here.
187187
public func qualifiedFoo(_ key: NonSynthesizedClass.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
188188
internal func qualifiedBar(_ key: NonSynthesizedClass.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
189-
fileprivate func qualfiedBaz(_ key: NonSynthesizedClass.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
189+
fileprivate func qualifiedBaz(_ key: NonSynthesizedClass.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
190190
private func qualifiedQux(_ key: NonSynthesizedClass.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'class_codable_member_type_lookup.NonSynthesizedClass'}}
191191

192192
// Unqualified lookups should find the public top-level CodingKeys type.
@@ -268,7 +268,7 @@ struct ExplicitClass : Codable {
268268
// Qualified type lookup should always be unambiguous.
269269
public func qualifiedFoo(_ key: ExplicitClass.CodingKeys) {}
270270
internal func qualifiedBar(_ key: ExplicitClass.CodingKeys) {}
271-
fileprivate func qualfiedBaz(_ key: ExplicitClass.CodingKeys) {}
271+
fileprivate func qualifiedBaz(_ key: ExplicitClass.CodingKeys) {}
272272
private func qualifiedQux(_ key: ExplicitClass.CodingKeys) {}
273273

274274
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -347,7 +347,7 @@ struct ExplicitClass : Codable {
347347
// Qualified lookup should remain as-is.
348348
public func qualifiedFoo(_ key: ExplicitClass.CodingKeys) {}
349349
internal func qualifiedBar(_ key: ExplicitClass.CodingKeys) {}
350-
fileprivate func qualfiedBaz(_ key: ExplicitClass.CodingKeys) {}
350+
fileprivate func qualifiedBaz(_ key: ExplicitClass.CodingKeys) {}
351351
private func qualifiedQux(_ key: ExplicitClass.CodingKeys) {}
352352

353353
// Unqualified lookups should find the ExplicitClass's synthesized
@@ -437,7 +437,7 @@ struct ExtendedClass : Codable {
437437
// Qualified type lookup should always be unambiguous.
438438
public func qualifiedFoo(_ key: ExtendedClass.CodingKeys) {}
439439
internal func qualifiedBar(_ key: ExtendedClass.CodingKeys) {}
440-
fileprivate func qualfiedBaz(_ key: ExtendedClass.CodingKeys) {}
440+
fileprivate func qualifiedBaz(_ key: ExtendedClass.CodingKeys) {}
441441
private func qualifiedQux(_ key: ExtendedClass.CodingKeys) {}
442442

443443
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -516,7 +516,7 @@ struct ExtendedClass : Codable {
516516
// Qualified lookup should remain as-is.
517517
public func qualifiedFoo(_ key: ExtendedClass.CodingKeys) {}
518518
internal func qualifiedBar(_ key: ExtendedClass.CodingKeys) {}
519-
fileprivate func qualfiedBaz(_ key: ExtendedClass.CodingKeys) {}
519+
fileprivate func qualifiedBaz(_ key: ExtendedClass.CodingKeys) {}
520520
private func qualifiedQux(_ key: ExtendedClass.CodingKeys) {}
521521

522522
// Unqualified lookups should find the ExtendedClass's synthesized

test/decl/protocol/special/coding/struct_codable_member_type_lookup.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct SynthesizedStruct : Codable {
1818
// Qualified type lookup should always be unambiguous.
1919
public func qualifiedFoo(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared public because its parameter uses a private type}}
2020
internal func qualifiedBar(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
21-
fileprivate func qualfiedBaz(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
21+
fileprivate func qualifiedBaz(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
2222
private func qualifiedQux(_ key: SynthesizedStruct.CodingKeys) {}
2323

2424
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -97,7 +97,7 @@ struct SynthesizedStruct : Codable {
9797
// Qualified lookup should remain as-is.
9898
public func qualifiedFoo(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared public because its parameter uses a private type}}
9999
internal func qualifiedBar(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared internal because its parameter uses a private type}}
100-
fileprivate func qualfiedBaz(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
100+
fileprivate func qualifiedBaz(_ key: SynthesizedStruct.CodingKeys) {} // expected-error {{method cannot be declared fileprivate because its parameter uses a private type}}
101101
private func qualifiedQux(_ key: SynthesizedStruct.CodingKeys) {}
102102

103103
// Unqualified lookups should find the SynthesizedStruct's synthesized
@@ -186,7 +186,7 @@ struct NonSynthesizedStruct : Codable { // expected-note 4 {{'NonSynthesizedStru
186186
// type here.
187187
public func qualifiedFoo(_ key: NonSynthesizedStruct.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
188188
internal func qualifiedBar(_ key: NonSynthesizedStruct.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
189-
fileprivate func qualfiedBaz(_ key: NonSynthesizedStruct.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
189+
fileprivate func qualifiedBaz(_ key: NonSynthesizedStruct.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
190190
private func qualifiedQux(_ key: NonSynthesizedStruct.CodingKeys) {} // expected-error {{'CodingKeys' is not a member type of struct 'struct_codable_member_type_lookup.NonSynthesizedStruct'}}
191191

192192
// Unqualified lookups should find the public top-level CodingKeys type.
@@ -268,7 +268,7 @@ struct ExplicitStruct : Codable {
268268
// Qualified type lookup should always be unambiguous.
269269
public func qualifiedFoo(_ key: ExplicitStruct.CodingKeys) {}
270270
internal func qualifiedBar(_ key: ExplicitStruct.CodingKeys) {}
271-
fileprivate func qualfiedBaz(_ key: ExplicitStruct.CodingKeys) {}
271+
fileprivate func qualifiedBaz(_ key: ExplicitStruct.CodingKeys) {}
272272
private func qualifiedQux(_ key: ExplicitStruct.CodingKeys) {}
273273

274274
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -347,7 +347,7 @@ struct ExplicitStruct : Codable {
347347
// Qualified lookup should remain as-is.
348348
public func qualifiedFoo(_ key: ExplicitStruct.CodingKeys) {}
349349
internal func qualifiedBar(_ key: ExplicitStruct.CodingKeys) {}
350-
fileprivate func qualfiedBaz(_ key: ExplicitStruct.CodingKeys) {}
350+
fileprivate func qualifiedBaz(_ key: ExplicitStruct.CodingKeys) {}
351351
private func qualifiedQux(_ key: ExplicitStruct.CodingKeys) {}
352352

353353
// Unqualified lookups should find the ExplicitStruct's synthesized
@@ -437,7 +437,7 @@ struct ExtendedStruct : Codable {
437437
// Qualified type lookup should always be unambiguous.
438438
public func qualifiedFoo(_ key: ExtendedStruct.CodingKeys) {}
439439
internal func qualifiedBar(_ key: ExtendedStruct.CodingKeys) {}
440-
fileprivate func qualfiedBaz(_ key: ExtendedStruct.CodingKeys) {}
440+
fileprivate func qualifiedBaz(_ key: ExtendedStruct.CodingKeys) {}
441441
private func qualifiedQux(_ key: ExtendedStruct.CodingKeys) {}
442442

443443
// Unqualified lookups should find the synthesized CodingKeys type instead
@@ -516,7 +516,7 @@ struct ExtendedStruct : Codable {
516516
// Qualified lookup should remain as-is.
517517
public func qualifiedFoo(_ key: ExtendedStruct.CodingKeys) {}
518518
internal func qualifiedBar(_ key: ExtendedStruct.CodingKeys) {}
519-
fileprivate func qualfiedBaz(_ key: ExtendedStruct.CodingKeys) {}
519+
fileprivate func qualifiedBaz(_ key: ExtendedStruct.CodingKeys) {}
520520
private func qualifiedQux(_ key: ExtendedStruct.CodingKeys) {}
521521

522522
// Unqualified lookups should find the ExtendedStruct's synthesized

test/decl/protocol/warn_override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protocol P1: P0 {
1919
var prop: A { get } // expected-warning{{implicit override should be marked with 'override' or suppressed with '@_nonoverride'}}
2020
}
2121

22-
// Silence warnings with @_nonoveride.
22+
// Silence warnings with @_nonoverride.
2323
protocol P2: P0 {
2424
@_nonoverride
2525
associatedtype A

test/decl/var/effectful_property_wrapper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Abstraction<T> {
1313
get throws { return value } // expected-error{{property wrappers currently cannot define an 'async' or 'throws' accessor}}
1414
}
1515

16-
// its OK to have effectul props that are not `wrappedValue`
16+
// its OK to have effectful props that are not `wrappedValue`
1717

1818
var prop1 : T {
1919
get async { value }

test/decl/var/lazy_self_capture.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-typecheck-verify-swift -parse-as-library
22

33
// This test case must be in a file with no other errors, otherwise we won't
4-
// compute caputures.
4+
// compute captures.
55

66
class C {
77
lazy var foo: String = {

0 commit comments

Comments
 (0)