Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/new.target/value-via-member.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-property-accessors-runtime-semantics-evaluation
5 es6id: 12.3.2.1
6 description: Value when invoked via MemberExpression
7 info: |
8 MemberExpression:MemberExpression.IdentifierName
9
10 [...]
11 6. Return a value of type Reference whose base value component is bv, whose
12 referenced name component is propertyNameString, and whose strict
13 reference flag is strict.
14
15 13.5.1 Runtime Semantics: Evaluation
16
17 ExpressionStatement : Expression ;
18
19 1. Let exprRef be the result of evaluating Expression.
20 2. Return ? GetValue(exprRef).
21 ---*/
22
23 var newTarget = null;
24
25 var obj = {
26 get m() {
27 newTarget = new.target;
28 }
29 };
30
31 obj.m;
32
33 assert.sameValue(newTarget, undefined);