Ignore:
Timestamp:
Mar 1, 2018, 9:55:39 PM (7 years ago)
Author:
Yusuke Suzuki
Message:

ASSERTION FAILED: matchContextualKeyword(m_vm->propertyNames->async)
https://bugs.webkit.org/show_bug.cgi?id=183173

Reviewed by Saam Barati.

JSTests:

  • stress/async-arrow-function-in-class-heritage.js: Added.

(testSyntax):
(testSyntaxError):
(SyntaxError):

Source/JavaScriptCore:

Classifier could propagate an error which does not occur at the first token
of the given expression. We should check whether the given token is "async"
instead of assertion.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseAssignmentExpression):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r228422 r229162  
    36383638            bool isAsyncArrow = false;
    36393639            if (UNLIKELY(classifier.indicatesPossibleAsyncArrowFunction())) {
    3640                 ASSERT(matchContextualKeyword(m_vm->propertyNames->async));
    3641                 next();
    3642                 isAsyncArrow = !m_lexer->prevTerminator();
     3640                if (matchContextualKeyword(m_vm->propertyNames->async)) {
     3641                    next();
     3642                    isAsyncArrow = !m_lexer->prevTerminator();
     3643                }
    36433644            }
    36443645            if (isArrowFunctionParameters()) {
Note: See TracChangeset for help on using the changeset viewer.