mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Rename ErrorType to ErrorProtocol
This commit is contained in:
committed by
Max Moiseev
parent
99d3f96c6d
commit
feacbc4433
@@ -111,13 +111,13 @@ func testUnreachableCase5(a : Tree) {
|
||||
}
|
||||
|
||||
|
||||
func testUnreachableAfterThrow(e : ErrorType) throws {
|
||||
func testUnreachableAfterThrow(e: ErrorProtocol) throws {
|
||||
throw e
|
||||
return // expected-warning {{code after 'throw' will never be executed}}
|
||||
}
|
||||
|
||||
class TestThrowInInit {
|
||||
required init(e : ErrorType) throws {
|
||||
required init(e: ErrorProtocol) throws {
|
||||
throw e // no unreachable code diagnostic for the implicit return.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user