diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index d0245883e4f4b..457f78c65b313 100644 --- a/test/expr/closure/closures.swift +++ b/test/expr/closure/closures.swift @@ -210,7 +210,7 @@ class ExplicitSelfRequiredTest { 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.}} 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.}} 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.}} - // With an empty capture list, insertion should should be suggested without a comma + // With an empty capture list, insertion should be suggested without a comma 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.}} 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.}} 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 { } } -// Apply the explicit 'self' rule even if it referrs to a capture, if +// Apply the explicit 'self' rule even if it refers to a capture, if // we're inside a nested closure class SR14120 { func operation() {} diff --git a/test/expr/closure/trailing.swift b/test/expr/closure/trailing.swift index 083538d9f3f9f..bee6896ff7339 100644 --- a/test/expr/closure/trailing.swift +++ b/test/expr/closure/trailing.swift @@ -133,7 +133,7 @@ let someInt = 0 let intArray = [someInt] limitXY(someInt, toGamut: intArray) {} // expected-error{{extra trailing closure passed in call}} -// QoI: Invalid trailing closures in stmt-conditions produce lowsy diagnostics +// QoI: Invalid trailing closures in stmt-conditions produce lousy diagnostics func retBool(x: () -> Int) -> Bool {} func maybeInt(_: () -> Int) -> Int? {} func twoClosureArgs(_:()->Void, _:()->Void) -> Bool {} diff --git a/test/expr/expressions.swift b/test/expr/expressions.swift index d99a4d7c69b9c..695d2038bbdcf 100644 --- a/test/expr/expressions.swift +++ b/test/expr/expressions.swift @@ -909,7 +909,7 @@ do { x = (x,(3,y)).1.1 } -// SR-3439 subscript with pound exprssions. +// SR-3439 subscript with pound expressions. Sr3439: do { class B { init() {}