22
33// This is close enough to get typo-correction.
44func test_short_and_close( ) {
5- let foo = 4 // expected-note {{did you mean 'foo'?}}
5+ let foo = 4
66 let bab = fob + 1 // expected-error {{use of unresolved identifier}}
77}
88
@@ -18,7 +18,7 @@ func *(x: Whatever, y: Whatever) {}
1818// This works even for single-character identifiers.
1919func test_very_short( ) {
2020 // Note that we don't suggest operators.
21- let x = 0 // expected-note {{did you mean 'x'?}}
21+ let x = 0
2222 let longer = y // expected-error {{use of unresolved identifier 'y'}}
2323}
2424
@@ -29,21 +29,21 @@ func test_own_initializer() {
2929
3030// Report candidates that are the same distance in different ways.
3131func test_close_matches( ) {
32- let match1 = 0 // expected-note {{did you mean 'match1'?}}
33- let match22 = 0 // expected-note {{did you mean 'match22'?}}
32+ let match1 = 0
33+ let match22 = 0
3434 let x = match2 // expected-error {{use of unresolved identifier 'match2'}}
3535}
3636
3737// Report not-as-good matches if they're still close enough to the best.
3838func test_keep_if_not_too_much_worse( ) {
39- let longmatch1 = 0 // expected-note {{did you mean 'longmatch1'?}}
40- let longmatch22 = 0 // expected-note {{did you mean 'longmatch22'?}}
39+ let longmatch1 = 0
40+ let longmatch22 = 0
4141 let x = longmatch // expected-error {{use of unresolved identifier 'longmatch'}}
4242}
4343
4444// Report not-as-good matches if they're still close enough to the best.
4545func test_drop_if_too_different( ) {
46- let longlongmatch1 = 0 // expected-note {{did you mean 'longlongmatch1'?}}
46+ let longlongmatch1 = 0
4747 let longlongmatch2222 = 0
4848 let x = longlongmatch // expected-error {{use of unresolved identifier 'longlongmatch'}}
4949}
@@ -61,8 +61,8 @@ func test_too_many_same() {
6161
6262// But if some are better than others, just drop the worse tier.
6363func test_too_many_but_some_better( ) {
64- let mtch1 = 0 // expected-note {{did you mean 'mtch1'?}}
65- let mtch2 = 0 // expected-note {{did you mean 'mtch2'?}}
64+ let mtch1 = 0
65+ let mtch2 = 0
6666 let match3 = 0
6767 let match4 = 0
6868 let match5 = 0
0 commit comments