File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -12323,7 +12323,7 @@ IdentPtr Parser::ParseSuper(bool fAllowCall)
12323
12323
{
12324
12324
// Any super access is good within a class constructor
12325
12325
}
12326
- else if ((this ->m_grfscr & fscrEval) == fscrEval || currentNonLambdaFunc->superRestrictionState == SuperRestrictionState::PropertyAllowed)
12326
+ else if ((this ->m_grfscr & fscrEval) == fscrEval || ( currentNonLambdaFunc != nullptr && currentNonLambdaFunc ->superRestrictionState == SuperRestrictionState::PropertyAllowed) )
12327
12327
{
12328
12328
// Currently for eval cases during compile time we use propertyallowed and throw during runtime for error cases
12329
12329
if (m_token.tk == tkLParen)
Original file line number Diff line number Diff line change
1
+ SyntaxError: Invalid use of the 'super' keyword
2
+ at code (SuperAccessInGlobalLambda.js:6:12)
Original file line number Diff line number Diff line change
1
+ //-------------------------------------------------------------------------------------------------------
2
+ // Copyright (C) Microsoft. All rights reserved.
3
+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4
+ //-------------------------------------------------------------------------------------------------------
5
+
6
+ ( ) => super . a ;
Original file line number Diff line number Diff line change 523
523
<compile-flags >-force:cachedScope</compile-flags >
524
524
</default >
525
525
</test >
526
+ <test >
527
+ <default >
528
+ <files >SuperAccessInGlobalLambda.js</files >
529
+ <baseline >SuperAccessInGlobalLambda.baseline</baseline >
530
+ <tags >exclude_jshost</tags >
531
+ </default >
532
+ </test >
526
533
</regress-exe >
You can’t perform that action at this time.
0 commit comments