File tree Expand file tree Collapse file tree
test/fixtures/experimental/decorators
decorator-member-expression-private
invalid-undefined-private-access Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -587,7 +587,15 @@ export default abstract class StatementParser extends ExpressionParser {
587587 while ( this . eat ( tt . dot ) ) {
588588 const node = this . startNodeAt ( startPos , startLoc ) ;
589589 node . object = expr ;
590- node . property = this . parseIdentifier ( true ) ;
590+ if ( this . match ( tt . privateName ) ) {
591+ this . classScope . usePrivateName (
592+ this . state . value ,
593+ this . state . startLoc ,
594+ ) ;
595+ node . property = this . parsePrivateName ( ) ;
596+ } else {
597+ node . property = this . parseIdentifier ( true ) ;
598+ }
591599 node . computed = false ;
592600 expr = this . finishNode ( node , "MemberExpression" ) ;
593601 }
Original file line number Diff line number Diff line change 1+ class C {
2+ static decFactory = ( ) => ( ) => { }
3+ static #decFactory = ( ) => ( ) => { }
4+ static dec = C . decFactory ( ) ;
5+ static #dec = C . #decFactory( ) ;
6+ static self = C ;
7+ static #self = C ;
8+ @C . #dec @C . self . #dec @C . #self. dec @C . #self. #dec
9+ @C . #decFactory( ) @C . self . #decFactory( ) @C . #self. decFactory ( ) @C . #self. #decFactory( )
10+ m ( ) { }
11+ }
You can’t perform that action at this time.
0 commit comments