1// Copyright JS Foundation and other contributors, http://js.foundation
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15function f() {}
16var B = class extends f {
17    constructor() {
18        String(Reflect.setPrototypeOf(B, null));
19        super($)
20    }
21}
22C = class extends B {
23    g() {
24        return function() {}
25    }
26}
27D = class extends C {
28    constructor() {
29        super()
30    }
31    g() {}
32}
33
34try {
35  new D
36  assert (false);
37} catch (e) {
38  assert (e instanceof TypeError);
39}
40