Skip to content

Commit 9629f9a

Browse files
authored
Merge pull request #70752 from DougGregor/effect-specifier-lookahead-fix
2 parents 3d49300 + 4232f33 commit 9629f9a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/Parse/ParseType.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,6 @@ bool Parser::isAtFunctionTypeArrow() {
18001800
if (isEffectsSpecifier(peekToken())) {
18011801
BacktrackingScope backtrack(*this);
18021802
consumeToken();
1803-
consumeToken();
18041803
return isAtFunctionTypeArrow();
18051804
}
18061805
// Don't look for '->' in code completion. The user may write it later.

test/Parse/typed_throws.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,8 @@ func testMissingError() throws() { }
2929

3030
func testRethrowsWithThrownType() rethrows(MyError) { }
3131
// expected-error@-1{{'rethrows' cannot be combined with a specific thrown error type}}
32+
33+
struct S<Element, Failure: Error> {
34+
init(produce: @escaping () async throws(Failure) -> Element?) {
35+
}
36+
}

0 commit comments

Comments
 (0)