File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1195,8 +1195,10 @@ ParserResult<TypeRepr> Parser::parseTypeTupleBody() {
11951195 if (EllipsisLoc.isInvalid ())
11961196 EllipsisIdx = ElementsR.size ();
11971197
1198- bool isFunctionType = Tok.isAny (tok::arrow, tok::kw_throws,
1199- tok::kw_rethrows);
1198+ bool isFunctionType =
1199+ Tok.isAny (tok::arrow, tok::kw_throws, tok::kw_rethrows) ||
1200+ (shouldParseExperimentalConcurrency () &&
1201+ Tok.isContextualKeyword (" async" ));
12001202
12011203 // If there were any labels, figure out which labels should go into the type
12021204 // representation.
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ func asyncGlobal2() async throws { }
55
66typealias AsyncFunc1 = ( ) async -> ( )
77typealias AsyncFunc2 = ( ) async throws -> ( )
8+ typealias AsyncFunc3 = ( _ a: Bool , _ b: Bool ) async throws -> ( )
89
910func testTypeExprs( ) {
1011 let _ = [ ( ) async -> ( ) ] ( )
You can’t perform that action at this time.
0 commit comments