@@ -3742,7 +3742,7 @@ export function parseSuperExpression(
37423742 case Token . LeftParen : {
37433743 // The super property has to be within a class constructor
37443744 if ( ( context & Context . SuperCall ) < 1 ) report ( parser , Errors . SuperNoConstructor ) ;
3745- if ( context & Context . InClass ) report ( parser , Errors . UnexpectedPrivateField ) ;
3745+ if ( context & Context . InClass ) report ( parser , Errors . InvalidSuperProperty ) ;
37463746 parser . assignable = AssignmentKind . CannotAssign ;
37473747 break ;
37483748 }
@@ -3751,7 +3751,7 @@ export function parseSuperExpression(
37513751 // new super() is never allowed.
37523752 // super() is only allowed in derived constructor
37533753 if ( ( context & Context . SuperProperty ) < 1 ) report ( parser , Errors . InvalidSuperProperty ) ;
3754- if ( context & Context . InClass ) report ( parser , Errors . UnexpectedPrivateField ) ;
3754+ if ( context & Context . InClass ) report ( parser , Errors . InvalidSuperProperty ) ;
37553755 parser . assignable = AssignmentKind . Assignable ;
37563756 break ;
37573757 }
@@ -8299,11 +8299,9 @@ function parseClassElementList(
82998299 nextToken ( parser , context ) ; // skip: '*'
83008300 } else if ( context & Context . OptionsNext && parser . token === Token . PrivateField ) {
83018301 kind |= PropertyKind . PrivateField ;
8302- key = parsePrivateIdentifier ( parser , context , tokenPos , linePos , colPos ) ;
8303- context = context | Context . InClass ;
8302+ key = parsePrivateIdentifier ( parser , context | Context . InClass , tokenPos , linePos , colPos ) ;
83048303 } else if ( context & Context . OptionsNext && ( parser . token & Token . IsClassField ) === Token . IsClassField ) {
83058304 kind |= PropertyKind . ClassField ;
8306- context = context | Context . InClass ;
83078305 } else if ( token === Token . EscapedFutureReserved ) {
83088306 key = parseIdentifier ( parser , context , 0 ) ;
83098307 if ( parser . token !== Token . LeftParen )
0 commit comments