blob: 70fbce6ef24b462bec875f855990b93d657f805a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// |reftest| error:SyntaxError
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-ctor-super-no-heritage.case
// - src/class-elements/syntax/invalid/cls-decl-elements-invalid-syntax.template
/*---
description: It is a SyntaxError if class has no heritage and constructor has a direct super (class declaration)
esid: prod-ClassElement
features: [class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ClassTail : ClassHeritageopt { ClassBody }
It is a Syntax Error if ClassHeritage is not present and the following algorithm evaluates to true:
1. Let constructor be ConstructorMethod of ClassBody.
2. If constructor is empty, return false.
3. Return HasDirectSuper of constructor.
---*/
$DONOTEVALUATE();
class C {
constructor() {
super();
}
}
|