summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/elements/syntax/valid/grammar-class-body-ctor-no-heritage.js
blob: fdf55541d94b5d554cf7641af0075be4f536fa90 (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
// This file was procedurally generated from the following sources:
// - src/class-elements/grammar-class-body-ctor-no-heritage.case
// - src/class-elements/syntax/valid/cls-decl-elements-valid-syntax.template
/*---
description: A constructor is valid without a super call in the constructor and heritage (class declaration)
esid: prod-ClassElement
features: [class]
flags: [generated]
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.

---*/


class C {
  constructor() {}
}

reportCompare(0, 0);