Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/super/prop-expr-obj-unresolvable.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 Reference resolution
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 2. If Type(V) is not Reference, return V.
15 3. Let base be GetBase(V).
16 4. If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
17 ---*/
18
19 var caught;
20 var obj = {
21 method() {
22 try {
23 super[test262unresolvable];
24 } catch (err) {
25 caught = err;
26 }
27 }
28 };
29
30 obj.method();
31
32 assert.sameValue(typeof caught, 'object');
33 assert.sameValue(caught.constructor, ReferenceError);