mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Diagnostics] s/may/must/ in 'may not fall through'
This commit is contained in:
@@ -218,7 +218,7 @@ class r20097963MyClass {
|
||||
func die() -> Never { die() }
|
||||
|
||||
func testGuard(_ a : Int) {
|
||||
guard case 4 = a else { } // expected-error {{'guard' body may not fall through, consider using a 'return' or 'throw'}}
|
||||
guard case 4 = a else { } // expected-error {{'guard' body must not fall through, consider using a 'return' or 'throw'}}
|
||||
|
||||
guard case 4 = a else { return } // ok
|
||||
guard case 4 = a else { die() } // ok
|
||||
|
||||
Reference in New Issue
Block a user