Skip to content

Commit ddc975b

Browse files
committed
Parse: Only parse 'reasync' if -enable-experimental-concurrency is on
1 parent 85bbf70 commit ddc975b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Parse/ParsePattern.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,8 @@ ParserStatus Parser::parseEffectsSpecifiers(SourceLoc existingArrowLoc,
851851

852852
while (true) {
853853
// 'async'
854-
bool isReasync = Tok.isContextualKeyword("reasync");
854+
bool isReasync = (shouldParseExperimentalConcurrency() &&
855+
Tok.isContextualKeyword("reasync"));
855856
if (Tok.isContextualKeyword("async") ||
856857
isReasync) {
857858
if (asyncLoc.isValid()) {

0 commit comments

Comments
 (0)