Debian Codegraph @

js/src/tests/test262/language/module-code/eval-export-dflt-expr-err-eval.js

raw
1 // |reftest| error:Test262Error module
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: >
6 Abrupt completions resulting from evaluation on AssignmentExpression are
7 forwarded to the runtime.
8 esid: sec-moduleevaluation
9 info: |
10 [...]
11 16. Let result be the result of evaluating module.[[ECMAScriptCode]].
12 [...]
13
14 15.2.3.11 Runtime Semantics: Evaluation
15
16 ExportDeclaration : export default AssignmentExpression;
17
18 [...]
19 1. Let rhs be the result of evaluating AssignmentExpression.
20 2. Let value be ? GetValue(rhs).
21
22 6.2.3.1 GetValue (V)
23
24 1. ReturnIfAbrupt(V).
25 2. If Type(V) is not Reference, return V.
26 3. Let base be GetBase(V).
27 4. If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
28 negative:
29 phase: runtime
30 type: Test262Error
31 flags: [module]
32 ---*/
33
34 export default (function() { throw new Test262Error(); })();