summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/class/syntax/class-body-has-direct-super-class-heritage.js
blob: 4c8a3a1499bb99f7ac3a4c62157592e94e6b8541 (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
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 14.5.1
description: >
    The opposite of:

      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 A {}
class B extends A {
  constructor() {
    super();
  }
}


assert.sameValue(typeof B, "function");

reportCompare(0, 0);