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
The decorators spec PR has the following note at the bottom of the Class Definition secition (15.8):
A class definition is always strict mode code.
The existing spec also specifies that "All parts of a ClassDeclaration or a ClassExpression are strict mode code." Given that DecoratorList is part of ClassDeclaration and ClassExpression, I understand that decorators are in strict mode too.
As a consequence expressions like @yield class C{} or @yield() class C{} are not allowed because "yield" as an IdentifierReference is not allowed in strict mode, contradicting these tests:
The decorators spec PR has the following note at the bottom of the Class Definition secition (15.8):
The existing spec also specifies that "All parts of a ClassDeclaration or a ClassExpression are strict mode code." Given that DecoratorList is part of ClassDeclaration and ClassExpression, I understand that decorators are in strict mode too.
As a consequence expressions like @yield class C{} or @yield() class C{} are not allowed because "yield" as an IdentifierReference is not allowed in strict mode, contradicting these tests:
Related issue in the decorators proposal:
tc39/proposal-decorators#545
The text was updated successfully, but these errors were encountered: