Debian Codegraph @

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

raw
1 // |reftest| 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 The `in` operator may occur within an exported AssignmentExpression
7 esid: sec-moduleevaluation
8 info: |
9 [...]
10 16. Let result be the result of evaluating module.[[ECMAScriptCode]].
11 [...]
12
13 15.2.3 Exports
14
15 Syntax
16
17 ExportDeclaration :
18
19 export default [lookahead ∉ { function, class }] AssignmentExpression[In];
20 flags: [module]
21 ---*/
22
23 var x = { x: true };
24
25 export default 'x' in x;
26 import f from './eval-export-dflt-expr-in.js';
27
28 assert.sameValue(f, true);
29
30 reportCompare(0, 0);