Skip to content

Commit 743eefb

Browse files
authored
Merge pull request #66498 from slavapestov/reword-diagnostics-in-current-context
Sema: Reword diagnostics to say 'without a type annotation' instead of 'without more context'
2 parents 9b9d576 + 1957bd6 commit 743eefb

33 files changed

+60
-60
lines changed

include/swift/AST/DiagnosticsSema.def

+3-3
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ ERROR(no_candidates_match_argument_type,none,
275275
(StringRef, Type, unsigned))
276276

277277
ERROR(cannot_infer_closure_parameter_type,none,
278-
"unable to infer type of a closure parameter %0 in the current context",
278+
"cannot infer type of closure parameter %0 without a type annotation",
279279
(StringRef))
280280
ERROR(cannot_infer_closure_type,none,
281-
"unable to infer closure type in the current context", ())
281+
"unable to infer closure type without a type annotation", ())
282282
ERROR(cannot_infer_empty_closure_result_type,none,
283283
"cannot infer return type of empty closure", ())
284284
ERROR(cannot_infer_closure_result_type,none,
@@ -4163,7 +4163,7 @@ ERROR(could_not_infer_placeholder,none,
41634163
"could not infer type for placeholder", ())
41644164

41654165
ERROR(type_of_expression_is_ambiguous,none,
4166-
"type of expression is ambiguous without more context", ())
4166+
"type of expression is ambiguous without a type annotation", ())
41674167

41684168
ERROR(failed_to_produce_diagnostic,Fatal,
41694169
"failed to produce diagnostic for expression; "

test/Constraints/closures.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ do {
516516
func set_via_closure<T, U>(_ closure: (inout T, U) -> ()) {} // expected-note {{in call to function 'set_via_closure'}}
517517
set_via_closure({ $0.number1 = $1 })
518518
// expected-error@-1 {{generic parameter 'T' could not be inferred}}
519-
// expected-error@-2 {{unable to infer type of a closure parameter '$1' in the current context}}
519+
// expected-error@-2 {{cannot infer type of closure parameter '$1' without a type annotation}}
520520

521521
func f2<T>(_ item: T, _ update: (inout T) -> Void) {
522522
var x = item
@@ -1052,12 +1052,12 @@ overloaded_with_default_and_autoclosure { 42 } // Ok
10521052
overloaded_with_default_and_autoclosure(42) // Ok
10531053

10541054
/// https://github.com/apple/swift/issues/55261
1055-
/// "error: type of expression is ambiguous without more context" in many cases
1055+
/// "error: type of expression is ambiguous without a type annotation" in many cases
10561056
/// where methods are missing.
10571057
do {
10581058
let _ = { a, b in }
1059-
// expected-error@-1 {{unable to infer type of a closure parameter 'a' in the current context}}
1060-
// expected-error@-2 {{unable to infer type of a closure parameter 'b' in the current context}}
1059+
// expected-error@-1 {{cannot infer type of closure parameter 'a' without a type annotation}}
1060+
// expected-error@-2 {{cannot infer type of closure parameter 'b' without a type annotation}}
10611061

10621062
_ = .a { b in } // expected-error {{cannot infer contextual base in reference to member 'a'}}
10631063

@@ -1078,7 +1078,7 @@ let explicitUnboundResult2: (Array<Bool>) -> Array<Int> = {
10781078
}
10791079
// FIXME: Should we prioritize the contextual result type and infer Array<Int>
10801080
// rather than using a type variable in these cases?
1081-
// expected-error@+1 {{unable to infer closure type in the current context}}
1081+
// expected-error@+1 {{unable to infer closure type without a type annotation}}
10821082
let explicitUnboundResult3: (Array<Bool>) -> Array<Int> = {
10831083
(arr: Array) -> Array in [true]
10841084
}

test/Constraints/construction.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ extension S3 {
154154
let s3b = S3(maybe: s3a)
155155

156156
// https://github.com/apple/swift/issues/47820
157-
// Erroneous diagnostic: type of expression is ambiguous without more context
157+
// Erroneous diagnostic: type of expression is ambiguous without a type annotation
158158
do {
159159
class C {
160160
struct S {

test/Constraints/diagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func r18800223(_ i : Int) {
297297
}
298298

299299
// <rdar://problem/21883806> Bogus "'_' can only appear in a pattern or on the left side of an assignment" is back
300-
_ = { $0 } // expected-error {{unable to infer type of a closure parameter '$0' in the current context}}
300+
_ = { $0 } // expected-error {{cannot infer type of closure parameter '$0' without a type annotation}}
301301

302302

303303

test/Constraints/diagnostics_swift4.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class C_45110: P_45110 {
2929

3030
let _ = S_45110(arg: [C_45110()]) // expected-error {{extraneous argument label 'arg:' in call}}
3131

32-
// rdar://problem/31898542 - Swift 4: 'type of expression is ambiguous without more context' errors, without a fixit
32+
// rdar://problem/31898542 - Swift 4: 'type of expression is ambiguous without a type annotation' errors, without a fixit
3333

3434
enum R31898542<T> {
3535
case success(T) // expected-note {{'success' declared here}}

test/Constraints/if_expr.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func testNil3(_ x: Bool) {
9090
}
9191
func testNil4(_ x: Bool) {
9292
// FIXME: Bad diagnostic (#63130)
93-
let _: _? = if x { nil } else { 42 } // expected-error {{type of expression is ambiguous without more context}}
93+
let _: _? = if x { nil } else { 42 } // expected-error {{type of expression is ambiguous without a type annotation}}
9494
}
9595

9696
enum F<T> {
@@ -137,7 +137,7 @@ struct SQ : Q {
137137

138138
func testAssociatedTypeReturn1() {
139139
func fn<T : Q>(_ fn: (T) -> T.X) {}
140-
fn { x in // expected-error {{unable to infer type of a closure parameter 'x' in the current context}}
140+
fn { x in // expected-error {{cannot infer type of closure parameter 'x' without a type annotation}}
141141
if .random() { "" } else { "" }
142142
}
143143
fn { (x: SQ) in

test/Constraints/one_way_closure_params.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
func testBasic() {
44
let _: (Float) -> Float = { $0 + 1 }
55

6-
let _ = { $0 + 1 } // expected-error{{unable to infer type of a closure parameter '$0' in the current context}}
6+
let _ = { $0 + 1 } // expected-error{{cannot infer type of closure parameter '$0' without a type annotation}}
77
}
88

test/Constraints/operator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ func rdar60727310() {
284284
// FIXME: Bad diagnostic.
285285
func f_54877(_ e: Error) {
286286
func foo<T>(_ a: T, _ op: ((T, T) -> Bool)) {}
287-
foo(e, ==) // expected-error {{type of expression is ambiguous without more context}}
287+
foo(e, ==) // expected-error {{type of expression is ambiguous without a type annotation}}
288288
}
289289

290290
// rdar://problem/62054241 - Swift compiler crashes when passing < as the sort function in sorted(by:) and the type of the array is not comparable

test/Constraints/pack-expansion-expressions.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ do {
475475
}
476476
}
477477

478-
// rdar://107675464 - misplaced `each` results in `type of expression is ambiguous without more context`
478+
// rdar://107675464 - misplaced `each` results in `type of expression is ambiguous without a type annotation`
479479
do {
480480
func test_correct_each<each T: P>(_ value: repeat each T) -> (repeat each T.A) {
481481
return (repeat (each value).makeA()) // Ok

test/Constraints/parameterized_existentials.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ protocol P<A> {
66

77
func f1(x: any P) -> any P<Int> {
88
// FIXME: Bad diagnostic
9-
return x // expected-error {{type of expression is ambiguous without more context}}
9+
return x // expected-error {{type of expression is ambiguous without a type annotation}}
1010
}
1111

1212
func f2(x: any P<Int>) -> any P {

test/Constraints/rdar106598067.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ enum E: Error { case e }
55
// rdar://106598067 – Make sure we don't crash.
66
// FIXME: Bad diagnostic (the issue is that it should be written 'as', not 'as?')
77
let fn = {
8-
// expected-error@-1 {{unable to infer closure type in the current context}}
8+
// expected-error@-1 {{unable to infer closure type without a type annotation}}
99
do {} catch let x as? E {}
1010
// expected-warning@-1 {{'catch' block is unreachable because no errors are thrown in 'do' block}}
1111
}

test/Constraints/rdar107724970.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ func foo(_ x: E) {
88
// FIXME: We need to handle pattern arguments in a bunch of places in argument
99
// list diagnostic logic.
1010
// https://github.com/apple/swift/issues/65062
11-
let fn = { // expected-error {{unable to infer closure type in the current context}}
11+
let fn = { // expected-error {{unable to infer closure type without a type annotation}}
1212
switch x {
1313
case E.e(_, _):
1414
break

test/Constraints/rdar85263844_swift6.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ extension S4 where T == (outer: Int, y: Int) {
3232

3333
public func rdar85263844_2(_ x: [Int]) -> S4<(outer: Int, y: Int)> {
3434
// FIXME: Bad error message.
35-
S4(x.map { (inner: $0, y: $0) }) // expected-error {{type of expression is ambiguous without more context}}
35+
S4(x.map { (inner: $0, y: $0) }) // expected-error {{type of expression is ambiguous without a type annotation}}
3636
}

test/Constraints/switch_expr.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func testNil3(_ x: Bool) {
208208
}
209209
func testNil4(_ x: Bool) {
210210
// FIXME: Bad diagnostic (#63130)
211-
let _: _? = switch x { case true: nil case false: 42 } // expected-error {{type of expression is ambiguous without more context}}
211+
let _: _? = switch x { case true: nil case false: 42 } // expected-error {{type of expression is ambiguous without a type annotation}}
212212
}
213213

214214
enum G<T> {

test/Constraints/variadic_generic_constraints.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ takesAnyObject()
4141
takesAnyObject(C(), C(), C())
4242

4343
// FIXME: Bad diagnostic
44-
takesAnyObject(C(), S(), C()) // expected-error {{type of expression is ambiguous without more context}}
44+
takesAnyObject(C(), S(), C()) // expected-error {{type of expression is ambiguous without a type annotation}}
4545

4646
// Same-type requirements
4747

test/Interop/Cxx/foreign-reference/not-any-object.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ import Test;
2626
public func test(_ _: AnyObject) {}
2727

2828
// TODO: make this a better error.
29-
test(Empty.create()) // expected-error {{type of expression is ambiguous without more context}}
29+
test(Empty.create()) // expected-error {{type of expression is ambiguous without a type annotation}}

test/Interop/Cxx/namespace/inline-namespace-function-call-broken.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import namespaces;
2222

2323
// Swift's typechecker currently doesn't allow calling a function from inline namespace when it's referenced through the parent namespace.
2424
func test() {
25-
Parent.functionInInlineChild() // expected-error {{type of expression is ambiguous without more context}}
25+
Parent.functionInInlineChild() // expected-error {{type of expression is ambiguous without a type annotation}}
2626
}

test/Macros/macros_diagnostics.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ macro genericDeclMacro<T: Numeric, U: Numeric>(_ x: T, _ y: U)
9797

9898
func testDiags(a: Int, b: Int) {
9999
// FIXME: Bad diagnostic.
100-
let s = #stringify<Int, Int>(a + b) // expected-error{{type of expression is ambiguous without more context}}
100+
let s = #stringify<Int, Int>(a + b) // expected-error{{type of expression is ambiguous without a type annotation}}
101101

102102
_ = #stringify()
103103
// expected-error@-1{{missing argument for parameter #1 in macro expansion}}

test/Sema/diag_ambiguous_overloads.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ fe(.nope, .nyet) // expected-error {{type 'Int' has no member 'nope'}}
1616
// expected-error@-1 {{reference to member 'nyet' cannot be resolved without a contextual type}}
1717

1818
func fg<T>(_ f: (T) -> T) -> Void {}
19-
fg({x in x}) // expected-error {{unable to infer type of a closure parameter 'x' in the current context}}
19+
fg({x in x}) // expected-error {{cannot infer type of closure parameter 'x' without a type annotation}}
2020

2121

2222
struct S {
2323
func f<T>(_ i: (T) -> T, _ j: Int) -> Void {}
2424
func f(_ d: (Double) -> Double) -> Void {}
2525
func test() -> Void {
26-
f({x in x}, 2) // expected-error {{unable to infer type of a closure parameter 'x' in the current context}}
26+
f({x in x}, 2) // expected-error {{cannot infer type of closure parameter 'x' without a type annotation}}
2727
}
2828

2929
func g<T>(_ a: T, _ b: Int) -> Void {}

test/Sema/discard.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ enum E: Error { case err }
9797
discard (self) // expected-error {{cannot convert value of type 'File' to expected argument type 'Int'}}
9898

9999
// FIXME: we should get an error about it being illegal to discard in a closure.
100-
let _ = { // expected-error {{type of expression is ambiguous without more context}}
100+
let _ = { // expected-error {{type of expression is ambiguous without a type annotation}}
101101
discard self
102102
return 0
103103
}()

test/Sema/placeholder_type.swift

+18-18
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ let _ = [_].otherStaticMember.method()
147147
func f(x: Any, arr: [Int]) {
148148
// FIXME: Better diagnostics here. Maybe we should suggest replacing placeholders with 'Any'?
149149

150-
if x is _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
151-
if x is [_] {} // expected-error {{type of expression is ambiguous without more context}}
152-
if x is () -> _ {} // expected-error {{type of expression is ambiguous without more context}}
153-
if let y = x as? _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
154-
if let y = x as? [_] {} // expected-error {{type of expression is ambiguous without more context}}
155-
if let y = x as? () -> _ {} // expected-error {{type of expression is ambiguous without more context}}
156-
let y1 = x as! _ // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
157-
let y2 = x as! [_] // expected-error {{type of expression is ambiguous without more context}}
158-
let y3 = x as! () -> _ // expected-error {{type of expression is ambiguous without more context}}
150+
if x is _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
151+
if x is [_] {} // expected-error {{type of expression is ambiguous without a type annotation}}
152+
if x is () -> _ {} // expected-error {{type of expression is ambiguous without a type annotation}}
153+
if let y = x as? _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
154+
if let y = x as? [_] {} // expected-error {{type of expression is ambiguous without a type annotation}}
155+
if let y = x as? () -> _ {} // expected-error {{type of expression is ambiguous without a type annotation}}
156+
let y1 = x as! _ // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
157+
let y2 = x as! [_] // expected-error {{type of expression is ambiguous without a type annotation}}
158+
let y3 = x as! () -> _ // expected-error {{type of expression is ambiguous without a type annotation}}
159159

160160
switch x {
161161
case is _: break // expected-error {{type placeholder not allowed here}}
@@ -166,15 +166,15 @@ func f(x: Any, arr: [Int]) {
166166
case let y as () -> _: break // expected-error {{type placeholder not allowed here}}
167167
}
168168

169-
if arr is _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
170-
if arr is [_] {} // expected-error {{type of expression is ambiguous without more context}}
171-
if arr is () -> _ {} // expected-error {{type of expression is ambiguous without more context}}
172-
if let y = arr as? _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
173-
if let y = arr as? [_] {} // expected-error {{type of expression is ambiguous without more context}}
174-
if let y = arr as? () -> _ {} // expected-error {{type of expression is ambiguous without more context}}
175-
let y1 = arr as! _ // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without more context}}
176-
let y2 = arr as! [_] // expected-error {{type of expression is ambiguous without more context}}
177-
let y3 = arr as! () -> _ // expected-error {{type of expression is ambiguous without more context}}
169+
if arr is _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
170+
if arr is [_] {} // expected-error {{type of expression is ambiguous without a type annotation}}
171+
if arr is () -> _ {} // expected-error {{type of expression is ambiguous without a type annotation}}
172+
if let y = arr as? _ {} // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
173+
if let y = arr as? [_] {} // expected-error {{type of expression is ambiguous without a type annotation}}
174+
if let y = arr as? () -> _ {} // expected-error {{type of expression is ambiguous without a type annotation}}
175+
let y1 = arr as! _ // expected-error {{type placeholder not allowed here}} expected-error {{type of expression is ambiguous without a type annotation}}
176+
let y2 = arr as! [_] // expected-error {{type of expression is ambiguous without a type annotation}}
177+
let y3 = arr as! () -> _ // expected-error {{type of expression is ambiguous without a type annotation}}
178178

179179
switch arr {
180180
case is _: break // expected-error {{type placeholder not allowed here}}

test/Sema/property_wrapper_parameter_invalid.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func testInvalidWrapperInference() {
271271
S<Int>.test({ $value in })
272272

273273
func testGenericClosure<T>(_ closure: T) {}
274-
// expected-error@+1 {{unable to infer type of a closure parameter '$value' in the current context}}
274+
// expected-error@+1 {{cannot infer type of closure parameter '$value' without a type annotation}}
275275
testGenericClosure { $value in }
276276
testGenericClosure { ($value: ProjectionWrapper<Int>) in } // okay
277277

test/decl/protocol/existential_member_accesses_self_assoctype.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ do {
864864
// FIXME: Should GenericSignature::getConcreteType return the null type instead
865865
// of the error type here for Self.A, despite the broken conformance?
866866
let exist: any CompositionBrokenClassConformance_b & BadConformanceClass
867-
exist.method(false) // expected-error {{type of expression is ambiguous without more context}}
867+
exist.method(false) // expected-error {{type of expression is ambiguous without a type annotation}}
868868
}
869869

870870
/// Covariant Associated Type Erasure

test/decl/typealias/generic.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ let _ : D<Int, Int, Float> = D(a: 1, b: 2)
113113

114114
let _ : F = { (a : Int) -> Int in a } // Infer the types of F
115115

116-
let _ : F = { a in a } // expected-error {{unable to infer type of a closure parameter 'a' in the current context}}
116+
let _ : F = { a in a } // expected-error {{cannot infer type of closure parameter 'a' without a type annotation}}
117117

118118
_ = MyType(a: "foo", b: 42)
119119
_ = A(a: "foo", b: 42)

test/decl/var/property_wrappers_invalid.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// FIXME: This should produce a diagnostic with a proper
44
// source location. Right now, we just get three useless errors:
55

6-
// <unknown>:0: error: type of expression is ambiguous without more context
7-
// <unknown>:0: error: type of expression is ambiguous without more context
8-
// <unknown>:0: error: type of expression is ambiguous without more context
6+
// <unknown>:0: error: type of expression is ambiguous without a type annotation
7+
// <unknown>:0: error: type of expression is ambiguous without a type annotation
8+
// <unknown>:0: error: type of expression is ambiguous without a type annotation
99

1010
// The actual problem is the type of the subscript declaration is wrong.
1111

test/expr/closure/basic.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func variadic() {
2626
_ = f(1, 2)
2727
_ = f(1, 3)
2828

29-
let D = { (Ss ...) in 1 } // expected-error{{'...' cannot be applied to a subpattern which is not explicitly typed}}, expected-error{{unable to infer type of a closure parameter 'Ss' in the current context}}
29+
let D = { (Ss ...) in 1 } // expected-error{{'...' cannot be applied to a subpattern which is not explicitly typed}}, expected-error{{cannot infer type of closure parameter 'Ss' without a type annotation}}
3030
}
3131

3232
// Closures with attributes in the parameter list.

test/expr/closure/closures.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ assert(f0(1) == 1)
117117

118118
// TODO(diagnostics): Bad diagnostic - should be `circular reference`
119119
var selfRef = { selfRef() }
120-
// expected-error@-1 {{unable to infer closure type in the current context}}
120+
// expected-error@-1 {{unable to infer closure type without a type annotation}}
121121

122122
// TODO: should be an error `circular reference` but it's diagnosed via overlapped requests
123123
var nestedSelfRef = {

test/expr/closure/multi_statement.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func test_pattern_matches_only_cases() {
307307
}
308308
}
309309

310-
// rdar://91225620 - type of expression is ambiguous without more context in closure
310+
// rdar://91225620 - type of expression is ambiguous without a type annotation in closure
311311
func test_wrapped_var_without_initializer() {
312312
@propertyWrapper
313313
struct Wrapper {

test/expr/unary/if_expr.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ do {
504504
// FIXME: The type error is likely due to not solving the conjunction before attempting default type var bindings.
505505
let _ = (if .random() { Int?.none } else { 1 as Int? })?.bitWidth
506506
// expected-error@-1 {{'if' may only be used as expression in return, throw, or as the source of an assignment}}
507-
// expected-error@-2 {{type of expression is ambiguous without more context}}
507+
// expected-error@-2 {{type of expression is ambiguous without a type annotation}}
508508
}
509509
do {
510510
let _ = if .random() { Int?.none } else { 1 as Int? }!

test/expr/unary/keypath/salvage-with-other-type-errors.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct B {
4444
}
4545
}
4646
func f3() {
47-
B(v: "").f1(block: { _ in }).f2(keyPath: \B.v) // expected-error{{unable to infer type of a closure parameter '_' in the current context}}
47+
B(v: "").f1(block: { _ in }).f2(keyPath: \B.v) // expected-error{{cannot infer type of closure parameter '_' without a type annotation}}
4848
}
4949

5050
// https://github.com/apple/swift/issues/47949

0 commit comments

Comments
 (0)