Skip to content

Commit a93ec9d

Browse files
committed
[Sema] Fix failing typo-correction test
The unresolved identifier 'esp' used to have '_exp' as a typo-correction option. That's no longer the case, and the type checker now singles out 'test' as the unique correction.
1 parent 9d23ba2 commit a93ec9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/Parse/recovery.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ func useContainer() -> () {
3333
func exists() -> Bool { return true }
3434
}
3535

36-
func test(a: BadAttributes) -> () { // expected-note * {{did you mean 'test'?}}
36+
// expected-note @+2 {{did you mean 'test'?}}
37+
// expected-note @+1 {{'test' declared here}}
38+
func test(a: BadAttributes) -> () {
3739
_ = a.exists() // no-warning
3840
}
3941

@@ -617,7 +619,7 @@ func foo1(bar!=baz) {} // expected-note {{did you mean 'foo1'?}}
617619
func foo2(bar! = baz) {}// expected-note {{did you mean 'foo2'?}}
618620

619621
// rdar://19605567
620-
// expected-error@+1{{use of unresolved identifier 'esp'}}
622+
// expected-error@+1{{use of unresolved identifier 'esp'; did you mean 'test'?}}
621623
switch esp {
622624
case let (jeb):
623625
// expected-error@+5{{operator with postfix spacing cannot start a subexpression}}

0 commit comments

Comments
 (0)