Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/super/prop-expr-cls-err.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-super-keyword
5 es6id: 12.3.5
6 description: Abrupt completion from Expression evaluation
7 info: |
8 1. Let propertyNameReference be the result of evaluating Expression.
9 2. Let propertyNameValue be ? GetValue(propertyNameReference).
10
11 6.2.3.1 GetValue
12
13 1. ReturnIfAbrupt(V).
14 features: [class]
15 ---*/
16
17 var thrown = new Test262Error();
18 var caught;
19 function thrower() {
20 throw thrown;
21 }
22 class C {
23 method() {
24 try {
25 super[thrower()];
26 } catch (err) {
27 caught = err;
28 }
29 }
30 }
31
32 C.prototype.method();
33
34 assert.sameValue(caught, thrown);