Debian Codegraph @

js/src/tests/test262/language/module-code/early-import-as-arguments.js

raw
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 "arguments"
6 esid: sec-imports
7 info: |
8 ImportSpecifier :
9 ImportedBinding
10 IdentifierName as ImportedBinding
11
12 ImportedBinding :
13 BindingIdentifier
14
15 12.1.1 Static Semantics : Early Errors
16
17 BindingIdentifier : Identifier
18
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 ---*/
27
28 $DONOTEVALUATE();
29
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 };
35
36 import { x as arguments } from './early-import-as-arguments.js';