Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / language / module-code / early-import-as-eval.js
blob26344f690029b5ad7275bcf27aba3dae13336f19
1 // |reftest| error:SyntaxError 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: ImportedBinding is a BindingIdentifier and cannot be "eval"
6 esid: sec-imports
7 info: |
8     ImportSpecifier :
9       ImportedBinding
10       IdentifierName as ImportedBinding
12     ImportedBinding :
13       BindingIdentifier
15     12.1.1 Static Semantics : Early Errors
17     BindingIdentifier : Identifier
19     - It is a Syntax Error if the code matched by this production is contained
20       in strict mode code and the StringValue of Identifier is "arguments" or
21       "eval".
22 negative:
23   phase: parse
24   type: SyntaxError
25 flags: [module]
26 ---*/
28 $DONOTEVALUATE();
30 // Create an appropriately-named ExportEntry in order to avoid false positives
31 // (e.g. cases where the implementation does not generate the expected early
32 // error but does produce a SyntaxError for unresolvable bindings).
33 var x;
34 export { x };
36 import { x as eval } from './early-import-as-eval.js';