Skip to content

Commit ba1bbd0

Browse files
committed
updated missed tests
1 parent a72a0c8 commit ba1bbd0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

test/Constraints/dynamic_lookup.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ obj.foo!(5)
117117
obj.foo!("hello")
118118
obj.wibble!()
119119
obj.wobble!() // expected-error{{value of type 'Id' (aka 'AnyObject') has no member 'wobble'}}
120-
obj.ext1!() // expected-warning {{result of call is unused}}
120+
obj.ext1!() // expected-warning {{result of call to function returning 'A' is unused}}
121121
obj.wonka!()
122122

123123
// Same as above but without the '!'
@@ -126,7 +126,7 @@ obj.foo(5)
126126
obj.foo("hello")
127127
obj.wibble()
128128
obj.wobble() // expected-error{{value of type 'Id' (aka 'AnyObject') has no member 'wobble'}}
129-
obj.ext1() // expected-warning {{result of call is unused}}
129+
obj.ext1() // expected-warning {{result of call to function returning 'A' is unused}}
130130
obj.wonka()
131131

132132
// Find class methods via dynamic method lookup.
@@ -144,7 +144,7 @@ var ovl1Result = obj.ovl1!()
144144
ovl1Result = A() // verify that we got an A, not a B
145145

146146
// Same as above but without the '!'
147-
obj.ovl1() // expected-warning {{result of call is unused}}
147+
obj.ovl1() // expected-warning {{result of call to function returning 'A' is unused}}
148148

149149
// Don't allow overload resolution between declarations from different
150150
// classes.
@@ -163,7 +163,7 @@ var ovl4Result = obj.ovl4!()
163163
var ovl5Result = obj.ovl5!() // expected-error{{ambiguous use of 'ovl5()'}}
164164

165165
// Same as above but without the '!'
166-
obj.ovl4() // expected-warning {{result of call is unused}}
166+
obj.ovl4() // expected-warning {{result of call to function returning 'B' is unused}}
167167

168168
// Generics
169169

test/Parse/toplevel_library_invalid.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ x + x; // expected-error {{expressions are not allowed at the top level}} expect
77
// Make sure we don't crash on closures at the top level
88
({ }) // expected-error {{expressions are not allowed at the top level}} expected-error{{expression resolves to an unused function}}
99
({ 5 }()) // expected-error {{expressions are not allowed at the top level}}
10-
// expected-warning @-1 {{result of call is unused}}
10+
// expected-warning @-1 {{result of call to closure returning 'Int' is unused}}
1111

1212

1313
// expected-error @+3 {{expected 'in' after for-each pattern}}

test/Parse/try.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct r21432429 {
151151

152152
// <rdar://problem/21427855> Swift 2: Omitting try from call to throwing closure in rethrowing function crashes compiler
153153
func callThrowingClosureWithoutTry(closure: (Int) throws -> Int) rethrows {
154-
closure(0) // expected-error {{call can throw but is not marked with 'try'}} expected-warning {{result of call is unused}}
154+
closure(0) // expected-error {{call can throw but is not marked with 'try'}} expected-warning {{result of call to function returning 'Int' is unused}}
155155
// expected-note@-1 {{did you mean to use 'try'?}} {{3-3=try }}
156156
// expected-note@-2 {{did you mean to handle error as optional value?}} {{3-3=try? }}
157157
// expected-note@-3 {{did you mean to disable error propagation?}} {{3-3=try! }}

test/decl/ext/protocol_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class OC1 : OP1 {
1616

1717
func testOP1(_ oc1: OC1, ao: AnyObject) {
1818
_ = oc1.extOP1a()
19-
// expected-warning @+1 {{result of call is unused}}
19+
// expected-warning @+1 {{result of call to function returning 'Bool' is unused}}
2020
ao.reqOP1a!() // okay
2121

2222
// Extension of @objc protocol does not have @objc members.

test/expr/expressions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func test_lambda2() {
258258
{ () -> protocol<Int> in
259259
// expected-warning @-1 {{'protocol<...>' composition syntax is deprecated and not needed here}} {{11-24=Int}}
260260
// expected-error @-2 {{non-protocol, non-class type 'Int' cannot be used within a protocol-constrained type}}
261-
// expected-warning @-3 {{result of call is unused}}
261+
// expected-warning @-3 {{result of call to closure returning 'Any' is unused}}
262262
return 1
263263
}()
264264
}

0 commit comments

Comments
 (0)