Skip to content

Commit 92a1c4b

Browse files
authored
Spelling test expr (#58577)
* spelling: expressions Signed-off-by: Josh Soref <[email protected]> * spelling: lousy Signed-off-by: Josh Soref <[email protected]> * spelling: refers Signed-off-by: Josh Soref <[email protected]> * spelling: should Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent c7e7e67 commit 92a1c4b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/expr/closure/closures.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class ExplicitSelfRequiredTest {
210210
doStuff {method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{14-14= [self] in }} expected-note{{reference 'self.' explicitly}} {{14-14=self.}}
211211
doVoidStuff {_ = method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{18-18= [self] in }} expected-note{{reference 'self.' explicitly}} {{22-22=self.}}
212212
doVoidStuff {() -> () in _ = method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{18-18= [self]}} expected-note{{reference 'self.' explicitly}} {{34-34=self.}}
213-
// With an empty capture list, insertion should should be suggested without a comma
213+
// With an empty capture list, insertion should be suggested without a comma
214214
doStuff { [] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{21-21=self.}}
215215
doStuff { [ ] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{23-23=self.}}
216216
doStuff { [ /* This space intentionally left blank. */ ] in method() } // expected-error {{call to method 'method' in closure requires explicit use of 'self' to make capture semantics explicit}} expected-note{{capture 'self' explicitly to enable implicit 'self' in this closure}} {{16-16=self}} expected-note{{reference 'self.' explicitly}} {{65-65=self.}}
@@ -553,7 +553,7 @@ class SR3186 {
553553
}
554554
}
555555

556-
// Apply the explicit 'self' rule even if it referrs to a capture, if
556+
// Apply the explicit 'self' rule even if it refers to a capture, if
557557
// we're inside a nested closure
558558
class SR14120 {
559559
func operation() {}

test/expr/closure/trailing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ let someInt = 0
133133
let intArray = [someInt]
134134
limitXY(someInt, toGamut: intArray) {} // expected-error{{extra trailing closure passed in call}}
135135

136-
// <rdar://problem/23036383> QoI: Invalid trailing closures in stmt-conditions produce lowsy diagnostics
136+
// <rdar://problem/23036383> QoI: Invalid trailing closures in stmt-conditions produce lousy diagnostics
137137
func retBool(x: () -> Int) -> Bool {}
138138
func maybeInt(_: () -> Int) -> Int? {}
139139
func twoClosureArgs(_:()->Void, _:()->Void) -> Bool {}

test/expr/expressions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ do {
909909
x = (x,(3,y)).1.1
910910
}
911911

912-
// SR-3439 subscript with pound exprssions.
912+
// SR-3439 subscript with pound expressions.
913913
Sr3439: do {
914914
class B {
915915
init() {}

0 commit comments

Comments
 (0)