File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
test/Utils/update-verify-tests
utils/update_verify_tests Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,21 @@ func bar() {
1616 a = 2 // expected-error@+1{{asdf}}
1717}
1818
19+ func baz( ) {
20+ // expected-error@+2{{cannot find 'a' in scope}}
21+ // expected-error@+1{{cannot find 'a'}}
22+ let b = a; let c = a; // expected-error{{asdf}}
23+ }
24+
25+ func qux( ) {
26+ let b = a; let c = a; // expected-error{{asdf}}
27+ }
28+
29+ func foobar( ) {
30+ var b = 1
31+ b = a; b = a; // expected-error{{asdf}}
32+ }
33+
1934//--- test.swift.expected
2035func foo( ) {
2136 // expected-note@+1{{'a' declared here}}
@@ -28,3 +43,22 @@ func bar() {
2843 a = 2
2944}
3045
46+ func baz( ) {
47+ // expected-error@+3{{cannot find 'a' in scope}}
48+ // expected-error@+2{{cannot find 'a'}}
49+ // expected-note@+1{{'b' declared here}}
50+ let b = a; let c = a;
51+ }
52+
53+ func qux( ) {
54+ // expected-note@+2{{'b' declared here}}
55+ // expected-error@+1{{cannot find 'a' in scope}}
56+ let b = a; let c = a; // expected-error{{cannot find 'a' in scope; did you mean 'b'?}}
57+ }
58+
59+ func foobar( ) {
60+ // expected-note@+1 2{{'b' declared here}}
61+ var b = 1
62+ b = a; b = a; // expected-error 2{{cannot find 'a' in scope; did you mean 'b'?}}
63+ }
64+
Original file line number Diff line number Diff line change @@ -409,6 +409,7 @@ def remove_dead_diags(lines):
409409 continue
410410 line .diag .take (other_diag )
411411 remove_line (other_diag .line , lines )
412+ break
412413
413414
414415def fold_expansions (lines ):
You can’t perform that action at this time.
0 commit comments