Better error message for anonymous class declarations (#509)
This commit is contained in:
committed by
Daniel Tschinder
parent
7f9eb50b2c
commit
4e776bf00b
@@ -804,7 +804,7 @@ export default class StatementParser extends ExpressionParser {
|
||||
if (optionalId || !isStatement) {
|
||||
node.id = null;
|
||||
} else {
|
||||
this.unexpected();
|
||||
this.unexpected(null, "A class name is required");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user