From 289dca4f2765c59b4a968ce6fb7584d488cb65ae Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:30:07 -0400 Subject: [PATCH 1/4] spelling: expressions Signed-off-by: Josh Soref --- test/expr/expressions.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {} From 35edaaa2b18b3dbff5a12869f0d442e4e245e7bc Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:37:04 -0400 Subject: [PATCH 2/4] spelling: lousy Signed-off-by: Josh Soref --- test/expr/closure/trailing.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {} From d53c9cd21b28aa8f444a78caf325a02b2955ce3e Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:45:13 -0400 Subject: [PATCH 3/4] spelling: refers Signed-off-by: Josh Soref --- test/expr/closure/closures.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index d0245883e4f4b..fd308afc8cc57 100644 --- a/test/expr/closure/closures.swift +++ b/test/expr/closure/closures.swift @@ -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() {} From e3462f6b75e0e2b056bbfe6668da8e14f57b2650 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Sun, 17 Apr 2022 15:48:30 -0400 Subject: [PATCH 4/4] spelling: should Signed-off-by: Josh Soref --- test/expr/closure/closures.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index fd308afc8cc57..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.}}