mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SE-0112] Rename ErrorProtocol to Error.
This is bullet (5) of the proposed solution in SE-0112, and the last major piece to be implemented.
This commit is contained in:
@@ -110,13 +110,13 @@ func testUnreachableCase5(a : Tree) {
|
||||
}
|
||||
|
||||
|
||||
func testUnreachableAfterThrow(e: ErrorProtocol) throws {
|
||||
func testUnreachableAfterThrow(e: Error) throws {
|
||||
throw e
|
||||
return // expected-warning {{code after 'throw' will never be executed}}
|
||||
}
|
||||
|
||||
class TestThrowInInit {
|
||||
required init(e: ErrorProtocol) throws {
|
||||
required init(e: Error) throws {
|
||||
throw e // no unreachable code diagnostic for the implicit return.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user