Debian Codegraph @

js/src/tests/test262/language/expressions/import.meta/not-accessible-from-direct-eval.js

raw
1 // |reftest| module
2 // Copyright (C) 2018 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-left-hand-side-expressions-static-semantics-early-errors
7 description: >
8 import.meta is not allowed in direct eval in module code.
9 info: |
10 It is an early Syntax Error if Module is not the syntactic goal symbol.
11 flags: [module]
12 features: [import.meta]
13 ---*/
14
15 assert.throws(SyntaxError, function() {
16 eval("import.meta");
17 });
18
19 reportCompare(0, 0);