You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
&& (IsStrictMode() || (pnodeFnc->IsGenerator()) || m_token.tk != tkYIELD || fDeclaration)) // Function expressions can have the name yield even inside generator functions
6314
+
&& (IsStrictMode() || fDeclaration
6315
+
|| pnodeFnc->IsGenerator() || pnodeFnc->IsAsync()
6316
+
|| (m_token.tk != tkYIELD && m_token.tk != tkAWAIT))) // Function expressions can have the name yield/await even inside generator/async functions
6315
6317
{
6316
6318
if (fDeclaration ||
6317
6319
m_token.IsReservedWord()) // For example: var x = (function break(){});
if (m_currentScope->GetScopeType() == ScopeType_Parameter)
8466
+
if (m_currentScope->GetScopeType() == ScopeType_Parameter
8467
+
|| (m_currentScope->GetScopeType() == ScopeType_Block && m_currentScope->GetEnclosingScope()->GetScopeType() == ScopeType_Parameter)) // Check whether this is a class definition inside param scope
8465
8468
{
8466
8469
Error(ERRsyntax);
8467
8470
}
8468
8471
}
8469
8472
elseif (nop == knopAwait)
8470
8473
{
8471
8474
if (!this->GetScanner()->AwaitIsKeywordRegion() ||
(m_currentScope->GetScopeType() == ScopeType_Block && m_currentScope->GetEnclosingScope()->GetScopeType() == ScopeType_Parameter)) // Check whether this is a class definition inside param scope
8473
8477
{
8474
8478
// As with the 'yield' keyword, the case where 'await' is scanned as a keyword (tkAWAIT)
8475
8479
// but the scanner is not treating await as a keyword (!this->GetScanner()->AwaitIsKeyword())
0 commit comments