@@ -412,7 +412,7 @@ ParserResult<TypeRepr> Parser::parseType(Diag<> MessageID,
412412
413413 // Parse an async specifier.
414414 SourceLoc asyncLoc;
415- if (Context. LangOpts . EnableExperimentalConcurrency &&
415+ if (shouldParseExperimentalConcurrency () &&
416416 Tok.isContextualKeyword (" async" )) {
417417 asyncLoc = consumeToken ();
418418 }
@@ -423,7 +423,7 @@ ParserResult<TypeRepr> Parser::parseType(Diag<> MessageID,
423423 SourceLoc throwsLoc;
424424 if (Tok.isAny (tok::kw_throws, tok::kw_rethrows, tok::kw_throw, tok::kw_try) &&
425425 (peekToken ().is (tok::arrow) ||
426- (Context. LangOpts . EnableExperimentalConcurrency &&
426+ (shouldParseExperimentalConcurrency () &&
427427 peekToken ().isContextualKeyword (" async" )))) {
428428 if (Tok.isAny (tok::kw_rethrows, tok::kw_throw, tok::kw_try)) {
429429 // 'rethrows' is only allowed on function declarations for now.
@@ -436,7 +436,7 @@ ParserResult<TypeRepr> Parser::parseType(Diag<> MessageID,
436436 throwsLoc = consumeToken ();
437437
438438 // 'async' must preceed 'throws'; accept this but complain.
439- if (Context. LangOpts . EnableExperimentalConcurrency &&
439+ if (shouldParseExperimentalConcurrency () &&
440440 Tok.isContextualKeyword (" async" )) {
441441 asyncLoc = consumeToken ();
442442
@@ -1589,7 +1589,7 @@ bool Parser::canParseType() {
15891589 }
15901590
15911591 // Handle type-function if we have an 'async'.
1592- if (Context. LangOpts . EnableExperimentalConcurrency &&
1592+ if (shouldParseExperimentalConcurrency () &&
15931593 Tok.isContextualKeyword (" async" )) {
15941594 consumeToken ();
15951595
@@ -1605,7 +1605,7 @@ bool Parser::canParseType() {
16051605
16061606 // Allow 'async' here even though it is ill-formed, so we can provide
16071607 // a better error.
1608- if (Context. LangOpts . EnableExperimentalConcurrency &&
1608+ if (shouldParseExperimentalConcurrency () &&
16091609 Tok.isContextualKeyword (" async" ))
16101610 consumeToken ();
16111611
0 commit comments