Skip to content

Commit 0638a9a

Browse files
[test] Adjusting l-value resolves to unused variable test cases
1 parent 990b4ee commit 0638a9a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/Parse/consecutive_statements.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ func statement_starts() {
66

77
f(0)
88
f (0)
9-
f // expected-error{{expression resolves to an unused variable}}
9+
f // expected-warning{{expression resolves to an unused variable}}
1010
(0) // expected-warning {{integer literal is unused}}
1111

1212
var a = [1,2,3]
1313
a[0] = 1
1414
a [0] = 1
15-
a // expected-error{{expression resolves to an unused variable}}
15+
a // expected-warning{{expression resolves to an unused variable}}
1616
[0, 1, 2] // expected-warning {{expression of type '[Int]' is unused}}
1717
}
1818

test/Parse/super.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ class D : B {
3434
}
3535

3636
func super_calls() {
37-
super.foo // expected-error {{expression resolves to an unused property}}
37+
super.foo // expected-warning {{expression resolves to an unused property}}
3838
super.foo.bar // expected-error {{value of type 'Int' has no member 'bar'}}
3939
super.bar // expected-error {{expression resolves to an unused function}}
4040
super.bar()
4141
// FIXME: should also say "'super.init' cannot be referenced outside of an initializer"
4242
super.init // expected-error{{no exact matches in reference to initializer}}
4343
super.init() // expected-error{{'super.init' cannot be called outside of an initializer}}
4444
super.init(0) // expected-error{{'super.init' cannot be called outside of an initializer}} // expected-error {{missing argument label 'x:' in call}}
45-
super[0] // expected-error {{expression resolves to an unused subscript}}
45+
super[0] // expected-warning {{expression resolves to an unused subscript}}
4646
super
4747
.bar()
4848
}

test/expr/expressions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ func1()
2121
_ = 4+7
2222

2323
var bind_test1 : () -> () = func1
24-
var bind_test2 : Int = 4; func1 // expected-error {{expression resolves to an unused variable}}
24+
var bind_test2 : Int = 4; func1 // expected-warning {{expression resolves to an unused variable}}
2525

26-
(func1, func2) // expected-error {{expression resolves to an unused variable}}
26+
(func1, func2) // expected-warning {{expression resolves to an unused variable}}
2727

2828
func basictest() {
2929
// Simple integer variables.

0 commit comments

Comments
 (0)