Allow super in class properties (#499)
This commit is contained in:
@@ -381,7 +381,11 @@ export default class ExpressionParser extends LValParser {
|
||||
|
||||
switch (this.state.type) {
|
||||
case tt._super:
|
||||
if (!this.state.inMethod && !this.options.allowSuperOutsideMethod) {
|
||||
if (
|
||||
!this.state.inMethod &&
|
||||
!this.state.inClassProperty &&
|
||||
!this.options.allowSuperOutsideMethod
|
||||
) {
|
||||
this.raise(this.state.start, "'super' outside of function or class");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user