Skip to content

Commit 5e41794

Browse files
committed
AST: Quote attributes more consistently in DiagnosticsSema.def
1 parent ce9d5f5 commit 5e41794

File tree

147 files changed

+962
-942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+962
-942
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 157 additions & 137 deletions
Large diffs are not rendered by default.

test/ClangImporter/availability_macosx.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func bezierPathElementToInteger(_ e: NSBezierPathElement) -> Int {
2929
}
3030

3131
func integerToBezierPathElement(_ i: Int) -> NSBezierPathElement {
32-
// expected-note@-1 2 {{add @available attribute to enclosing global function}}
32+
// expected-note@-1 2 {{add '@available' attribute to enclosing global function}}
3333
switch i {
3434
case 1:
3535
return .moveTo

test/ClangImporter/cf.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ func testNonConstVoid() {
161161

162162
class NuclearFridge: CCRefrigerator {} // expected-error {{cannot inherit from Core Foundation type 'CCRefrigerator'}}
163163
extension CCRefrigerator {
164-
@objc func foo() {} // expected-error {{method cannot be marked @objc because Core Foundation types are not classes in Objective-C}}
164+
@objc func foo() {} // expected-error {{method cannot be marked '@objc' because Core Foundation types are not classes in Objective-C}}
165165
func bar() {} // okay, implicitly non-objc
166166
}
167167

168168
protocol SwiftProto {}
169169
@objc protocol ObjCProto {}
170-
extension CCRefrigerator: ObjCProto {} // expected-error {{Core Foundation class 'CCRefrigerator' cannot conform to @objc protocol 'ObjCProto' because Core Foundation types are not classes in Objective-C}}
170+
extension CCRefrigerator: ObjCProto {} // expected-error {{Core Foundation class 'CCRefrigerator' cannot conform to '@objc' protocol 'ObjCProto' because Core Foundation types are not classes in Objective-C}}
171171
extension CCRefrigerator: SwiftProto {}

test/ClangImporter/enum-error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func testError() {
118118

119119
#if ERRORS
120120
class ObjCTest {
121-
@objc func foo() -> TestError {} // expected-error {{method cannot be marked @objc because its result type cannot be represented in Objective-C}} expected-note {{Swift structs cannot be represented in Objective-C}}
121+
@objc func foo() -> TestError {} // expected-error {{method cannot be marked '@objc' because its result type cannot be represented in Objective-C}} expected-note {{Swift structs cannot be represented in Objective-C}}
122122
@objc func bar() -> TestError.Code {} // okay
123123
}
124124
#endif

test/ClangImporter/objc-cross-module-override.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import ImageInitializers
1212

1313
final class MyImage : Image {
14-
// CHECK: non-@objc initializer 'init(imageLiteralResourceName:)' is declared in extension of 'Image' and cannot be overridden
14+
// CHECK: non-'@objc' initializer 'init(imageLiteralResourceName:)' is declared in extension of 'Image' and cannot be overridden
1515
// Make sure we aren't emitting a fixit into the extant module...
1616
// CHECK-NOT: add '@objc' to make this declaration overridable
1717
// CHECK: ImageInitializers.Image.init:{{.*}}: note: overridden declaration is here

test/ClangImporter/objc_factory_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func testInstanceTypeFactoryMethodInherited() {
2828
}
2929

3030
func testFactoryWithLaterIntroducedInit() {
31-
// expected-note @-1 4{{add @available attribute to enclosing global function}}
31+
// expected-note @-1 4{{add '@available' attribute to enclosing global function}}
3232
// Prefer importing more available factory initializer over less
3333
// less available convenience initializer
3434
_ = NSHavingConvenienceFactoryAndLaterConvenienceInit(flim:5)

test/ClangImporter/objc_override.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class SomeCellSub5 : SomeCell {
8484
}
8585

8686
class FailSub : FailBase {
87-
override init(value: Int) { try! super.init(value: value) } // expected-error {{overriding a throwing @objc initializer with a non-throwing initializer is not supported}}
88-
override class func processValue() {} // expected-error {{overriding a throwing @objc method with a non-throwing method is not supported}}
87+
override init(value: Int) { try! super.init(value: value) } // expected-error {{overriding a throwing '@objc' initializer with a non-throwing initializer is not supported}}
88+
override class func processValue() {} // expected-error {{overriding a throwing '@objc' method with a non-throwing method is not supported}}
8989
}
9090

9191
class CallbackSubA : CallbackBase {

test/ClangImporter/objc_parse.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -648,24 +648,24 @@ class NewtypeUser {
648648
@objc func stringNewtype(a: SNTErrorDomain) {} // expected-error {{'SNTErrorDomain' has been renamed to 'ErrorDomain'}}{{31-45=ErrorDomain}}
649649
@objc func stringNewtypeOptional(a: SNTErrorDomain?) {} // expected-error {{'SNTErrorDomain' has been renamed to 'ErrorDomain'}}{{39-53=ErrorDomain}}
650650
@objc func intNewtype(a: MyInt) {}
651-
@objc func intNewtypeOptional(a: MyInt?) {} // expected-error {{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
652-
@objc func intNewtypeArray(a: [MyInt]) {} // expected-error {{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
651+
@objc func intNewtypeOptional(a: MyInt?) {} // expected-error {{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
652+
@objc func intNewtypeArray(a: [MyInt]) {} // expected-error {{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
653653
// expected-note@-1 {{Swift structs cannot be represented in Objective-C}}
654-
@objc func intNewtypeDictionary(a: [MyInt: NSObject]) {} // expected-error {{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
654+
@objc func intNewtypeDictionary(a: [MyInt: NSObject]) {} // expected-error {{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
655655
// expected-note@-1 {{Swift structs cannot be represented in Objective-C}}
656656
@objc func cfNewtype(a: CFNewType) {}
657-
@objc func cfNewtypeArray(a: [CFNewType]) {} // expected-error {{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
657+
@objc func cfNewtypeArray(a: [CFNewType]) {} // expected-error {{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
658658
// expected-note@-1 {{Swift structs cannot be represented in Objective-C}}
659659

660660
typealias MyTuple = (Int, AnyObject?)
661661
typealias MyNamedTuple = (a: Int, b: AnyObject?)
662662

663663
@objc func blockWithTypealias(_ input: @escaping (MyTuple) -> MyInt) {}
664-
// expected-error@-1{{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
664+
// expected-error@-1{{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
665665
// expected-note@-2{{function types cannot be represented in Objective-C}}
666666

667667
@objc func blockWithTypealiasWithNames(_ input: (MyNamedTuple) -> MyInt) {}
668-
// expected-error@-1{{method cannot be marked @objc because the type of the parameter cannot be represented in Objective-C}}
668+
// expected-error@-1{{method cannot be marked '@objc' because the type of the parameter cannot be represented in Objective-C}}
669669
// expected-note@-2{{function types cannot be represented in Objective-C}}
670670
}
671671

test/ClangImporter/objc_runtime_visible.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import ObjCRuntimeVisible
44

55
extension A {
6-
@objc func foo() { } // expected-error{{instance method cannot be marked @objc because class 'A' is only visible via the Objective-C runtime}}
6+
@objc func foo() { } // expected-error{{instance method cannot be marked '@objc' because class 'A' is only visible via the Objective-C runtime}}
77
func bar() {} // okay, implicitly non-objc
88
}
99

@@ -16,5 +16,5 @@ class B : A { } // expected-error{{cannot inherit from class 'A' because it is o
1616
protocol SwiftProto {}
1717
@objc protocol ObjCProto {}
1818

19-
extension A: ObjCProto {} // expected-error {{class 'A' cannot conform to @objc protocol 'ObjCProto' because the class is only visible via the Objective-C runtime}}
19+
extension A: ObjCProto {} // expected-error {{class 'A' cannot conform to '@objc' protocol 'ObjCProto' because the class is only visible via the Objective-C runtime}}
2020
extension A: SwiftProto {} // okay

test/Concurrency/actor_isolation_objc.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ actor A {
3636
var x: Int = 0 // expected-note{{add '@objc' to expose this property to Objective-C}}
3737

3838
@objc var y: Int = 0 // expected-note{{add '@objc' to expose this property to Objective-C}}
39-
// expected-error@-1{{actor-isolated property 'y' cannot be @objc}}
39+
// expected-error@-1{{actor-isolated property 'y' cannot be '@objc'}}
4040

4141
// expected-note@+1 {{add '@objc' to expose this property to Objective-C}}
42-
@objc var computed : Int { // expected-error{{actor-isolated property 'computed' cannot be @objc}}
42+
@objc var computed : Int { // expected-error{{actor-isolated property 'computed' cannot be '@objc'}}
4343
get { 120 }
4444
}
4545

@@ -50,7 +50,7 @@ actor A {
5050

5151
actor Dril: NSObject {
5252
// expected-note@+2 {{add 'async' to function 'postSynchronouslyTo(twitter:)' to make it asynchronous}}
53-
// expected-error@+1 {{actor-isolated instance method 'postSynchronouslyTo(twitter:)' cannot be @objc}}
53+
// expected-error@+1 {{actor-isolated instance method 'postSynchronouslyTo(twitter:)' cannot be '@objc'}}
5454
@objc func postSynchronouslyTo(twitter msg: String) -> Bool {
5555
return true
5656
}

test/Concurrency/async_conformance.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ import Foundation
1414
func track(event: String) async // expected-note {{protocol requires function 'track(event:)' with type '(String) async -> ()'}}
1515
}
1616
class Dog: NSObject, Tracker { // expected-error {{type 'Dog' does not conform to protocol 'Tracker'}} expected-note {{add stubs for conformance}}
17-
func track(event: String) {} // expected-note {{candidate is not 'async', but @objc protocol requirement is}}
17+
func track(event: String) {} // expected-note {{candidate is not 'async', but '@objc' protocol requirement is}}
1818
}
1919

2020
// sync objc requirement, async witness
2121
@objc protocol Runner {
2222
func run(event: String) // expected-note {{protocol requires function 'run(event:)' with type '(String) -> ()'}}
2323
}
2424
class Athlete: NSObject, Runner { // expected-error {{type 'Athlete' does not conform to protocol 'Runner'}} expected-note {{add stubs for conformance}}
25-
func run(event: String) async {} // expected-note {{candidate is 'async', but @objc protocol requirement is not}}
25+
func run(event: String) async {} // expected-note {{candidate is 'async', but '@objc' protocol requirement is not}}
2626
}
2727

2828

test/Concurrency/async_main_resolution.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ extension MainProtocol {
7070
// CHECK-IS-ASYNC: (func_decl {{.*}}implicit "$main()" interface_type="(MyMain.Type) -> () async -> ()"
7171
// CHECK-IS-ASYNC: (declref_expr implicit type="(MyMain.Type) -> () async -> ()"
7272

73-
// CHECK-IS-ERROR1: error: 'MyMain' is annotated with @main and must provide a main static function of type {{\(\) -> Void or \(\) throws -> Void|\(\) -> Void, \(\) throws -> Void, \(\) async -> Void, or \(\) async throws -> Void}}
73+
// CHECK-IS-ERROR1: error: 'MyMain' is annotated with '@main' and must provide a main static function of type {{\(\) -> Void or \(\) throws -> Void|\(\) -> Void, \(\) throws -> Void, \(\) async -> Void, or \(\) async throws -> Void}}
7474
// CHECK-IS-ERROR2: error: ambiguous use of 'main'

test/Concurrency/concurrency_availability.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import _Concurrency
77

88
func f() async { } // expected-error{{concurrency is only available in}}
9-
// expected-note@-1{{add @available}}
9+
// expected-note@-1{{add '@available'}}
1010

1111
actor A { } // expected-error{{concurrency is only available in}}
12-
// expected-note@-1{{add @available}}
12+
// expected-note@-1{{add '@available'}}
1313

1414
// Allow this without any availability for Historical Reasons.
1515
public func swift_deletedAsyncMethodError() async {

test/Concurrency/isolated_any.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,5 @@ func testFunctionIsolationExprTuple(
128128
func nonSendableIsolatedAny(
129129
_ fn: @escaping @isolated(any) () -> Void // expected-note {{parameter 'fn' is implicitly non-sendable}}
130130
) {
131-
let _: @Sendable () -> Void = fn // expected-warning {{using non-sendable parameter 'fn' in a context expecting a @Sendable closure}}
131+
let _: @Sendable () -> Void = fn // expected-warning {{using non-sendable parameter 'fn' in a context expecting a '@Sendable' closure}}
132132
}

test/Concurrency/isolation_macro_availability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@available(SwiftStdlib 5.1, *)
1111
func isolatedFunc(isolation: isolated (any Actor)? = #isolation) {}
1212

13-
func test() { // expected-note 3 {{add @available attribute to enclosing global function}}
13+
func test() { // expected-note 3 {{add '@available' attribute to enclosing global function}}
1414
_ = #isolation // expected-error {{'isolation()' is only available in}} expected-note {{add 'if #available' version check}}
1515
isolatedFunc() // expected-error {{'isolatedFunc(isolation:)' is only available in}} expected-note {{add 'if #available' version check}}
1616
// expected-error@-1 {{'isolation()' is only available in}}

test/Concurrency/objc_async_overload.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ extension Delegate {
4646
// expected-note@-1 {{parameter 'completionHandler' is implicitly non-sendable}}
4747
if let req = (req ?? nil) {
4848
makeRequest1(req, completionHandler: completionHandler)
49-
// expected-warning@-1 {{passing non-sendable parameter 'completionHandler' to function expecting a @Sendable closure}}
49+
// expected-warning@-1 {{passing non-sendable parameter 'completionHandler' to function expecting a '@Sendable' closure}}
5050
}
5151
}
5252
}

test/Concurrency/preconcurrency_conformances.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ do {
1010
class K {}
1111

1212
struct A : @preconcurrency Q {} // Ok
13-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'Q' has no effect}}
13+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'Q' has no effect}}
1414

1515
struct B : @preconcurrency K {
1616
// expected-error@-1 {{'preconcurrency' attribute cannot apply to non-protocol type 'K'}}
@@ -31,7 +31,7 @@ protocol InvalidUseOfPreconcurrencyAttr : @preconcurrency Q {
3131

3232
struct TestPreconcurrencyAttr {}
3333
extension TestPreconcurrencyAttr : @preconcurrency Q { // Ok
34-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'Q' has no effect}}
34+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'Q' has no effect}}
3535
}
3636

3737
class NonSendable {}
@@ -99,7 +99,7 @@ protocol Initializable {
9999
}
100100

101101
final class K : @preconcurrency Initializable {
102-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'Initializable' has no effect}}
102+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'Initializable' has no effect}}
103103
init() {} // Ok
104104
}
105105

@@ -139,7 +139,7 @@ do {
139139
// expected-warning@+2{{conformance of 'TestExplicitGlobalActorAttrs' to protocol 'WithIndividuallyIsolatedRequirements' involves isolation mismatches and can cause data races}}
140140
@MainActor
141141
struct TestExplicitGlobalActorAttrs : @preconcurrency WithIndividuallyIsolatedRequirements {
142-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'WithIndividuallyIsolatedRequirements' has no effect}}
142+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'WithIndividuallyIsolatedRequirements' has no effect}}
143143

144144
var a: Int = 42
145145

@@ -164,7 +164,7 @@ protocol WithNonIsolated {
164164
do {
165165
// expected-warning@+1{{conformance of 'TestExplicitOtherIsolation' to protocol 'WithNonIsolated' involves isolation mismatches and can cause data races}}
166166
class TestExplicitOtherIsolation : @preconcurrency WithNonIsolated {
167-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'WithNonIsolated' has no effect}}{{38-54=}}
167+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'WithNonIsolated' has no effect}}{{38-54=}}
168168

169169
@GlobalActor var prop: Int = 42
170170
// expected-note@-1 {{global actor 'GlobalActor'-isolated property 'prop' cannot satisfy main actor-isolated requirement}}
@@ -176,7 +176,7 @@ do {
176176

177177
do {
178178
class InferredGlobalActorAttrs : @preconcurrency WithNonIsolated {
179-
// expected-warning@-1 {{@preconcurrency attribute on conformance to 'WithNonIsolated' has no effect}}{{36-52=}}
179+
// expected-warning@-1 {{'@preconcurrency' on conformance to 'WithNonIsolated' has no effect}}{{36-52=}}
180180
var prop: Int = 42
181181
func test() {}
182182
}
@@ -203,7 +203,7 @@ do {
203203
protocol P2 {}
204204
protocol P3: P1, P2 {}
205205

206-
// expected-warning@+1 {{@preconcurrency attribute on conformance to 'P3' has no effect}}
206+
// expected-warning@+1 {{'@preconcurrency' on conformance to 'P3' has no effect}}
207207
@MainActor struct S: @preconcurrency P3 {}
208208
}
209209

@@ -234,7 +234,7 @@ do {
234234
// preconcurrency has no effect here.
235235
// expected-warning@+1{{conformance of 'S4' to protocol 'P2' crosses into main actor-isolated code and can cause data races}}
236236
@MainActor struct S4: @preconcurrency P3, P2 {
237-
// expected-warning@-1:21 {{@preconcurrency attribute on conformance to 'P3' has no effect}}
237+
// expected-warning@-1:21 {{'@preconcurrency' on conformance to 'P3' has no effect}}
238238
// expected-note@-2:45 {{turn data races into runtime errors with '@preconcurrency'}}
239239
// expected-note@-3{{mark all declarations used in the conformance 'nonisolated'}}
240240
// expected-note@-4{{isolate this conformance to the main actor with '@MainActor'}}
@@ -243,14 +243,14 @@ do {
243243
}
244244
// expected-warning@+1{{conformance of 'S5' to protocol 'P2' crosses into main actor-isolated code and can cause data races; this is an error in the Swift 6 language mode}}
245245
@MainActor struct S5: P2, @preconcurrency P3 {
246-
// expected-warning@-1:21 {{@preconcurrency attribute on conformance to 'P3' has no effect}}
246+
// expected-warning@-1:21 {{'@preconcurrency' on conformance to 'P3' has no effect}}
247247
// expected-note@-2:25 {{turn data races into runtime errors with '@preconcurrency'}}
248248
// expected-note@-3{{mark all declarations used in the conformance 'nonisolated'}}
249249
// expected-note@-4{{isolate this conformance to the main actor with '@MainActor'}}
250250
func foo() {}
251251
// expected-note@-1 {{main actor-isolated instance method 'foo()' cannot satisfy nonisolated requirement}}
252252
}
253-
// expected-warning@+1 {{@preconcurrency attribute on conformance to 'P3' has no effect}}
253+
// expected-warning@+1 {{'@preconcurrency' on conformance to 'P3' has no effect}}
254254
@MainActor struct S6: @preconcurrency P2, @preconcurrency P3 {
255255
func foo() {}
256256
}
@@ -274,7 +274,7 @@ do {
274274

275275
// Preconcurrency effectful for 'P3' only.
276276
@MainActor struct S3: @preconcurrency P3 & P4 {
277-
// expected-warning@-1:21 {{@preconcurrency attribute on conformance to 'P4' has no effect}}
277+
// expected-warning@-1:21 {{'@preconcurrency' on conformance to 'P4' has no effect}}
278278
func foo() {}
279279
}
280280
}
@@ -304,7 +304,7 @@ do {
304304

305305
// expected-warning@+1{{conformance of 'S4' to protocol 'P2' crosses into main actor-isolated code and can cause data races}}
306306
@MainActor struct S4: P6, @preconcurrency P5 {
307-
// expected-warning@-1:21 {{@preconcurrency attribute on conformance to 'P5' has no effect}}
307+
// expected-warning@-1:21 {{'@preconcurrency' on conformance to 'P5' has no effect}}
308308
// expected-note@-2{{turn data races into runtime errors with '@preconcurrency'}}
309309
// expected-note@-3{{mark all declarations used in the conformance 'nonisolated'}}
310310
// expected-note@-4{{isolate this conformance to the main actor with '@MainActor'}}

test/Concurrency/preconcurrency_overload.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extension Future {
2626
func flatMap<NewValue>(file: StaticString = #file, line: UInt = #line, _ callback: @escaping (T) -> Future<NewValue>) -> Future<NewValue> { // #2
2727
// expected-complete-and-tns-note @-1 {{parameter 'callback' is implicitly non-sendable}}
2828
return self.flatMap(callback)
29-
// expected-complete-and-tns-warning @-1 {{passing non-sendable parameter 'callback' to function expecting a @Sendable closure}}
29+
// expected-complete-and-tns-warning @-1 {{passing non-sendable parameter 'callback' to function expecting a '@Sendable' closure}}
3030
}
3131

3232
@inlinable

test/Concurrency/predates_concurrency.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ func testInAsync(x: X, plainClosure: () -> Void) async { // expected-note 2{{par
4141
let _: Int = x[{ onMainActor() }] // expected-error{{type '@Sendable () -> Void'}}
4242
let _: Int = X[statically: { onMainActor() }] // expected-error{{type '@Sendable () -> Void'}}
4343

44-
unsafelySendableClosure(plainClosure) // expected-warning {{passing non-sendable parameter 'plainClosure' to function expecting a @Sendable closure}}
44+
unsafelySendableClosure(plainClosure) // expected-warning {{passing non-sendable parameter 'plainClosure' to function expecting a '@Sendable' closure}}
4545
unsafelyMainActorClosure(plainClosure)
46-
unsafelyDoEverythingClosure(plainClosure) // expected-warning {{passing non-sendable parameter 'plainClosure' to function expecting a @Sendable closure}}
46+
unsafelyDoEverythingClosure(plainClosure) // expected-warning {{passing non-sendable parameter 'plainClosure' to function expecting a '@Sendable' closure}}
4747
}
4848

4949
func testElsewhere(x: X) {

0 commit comments

Comments
 (0)