Debian Codegraph @

js/src/tests/test262/language/eval-code/direct/strict-caller-function-context.js

raw
1 // Copyright (C) 2020 Leo Balter. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-performeval
5 description: Script will be script if strictCaller is true, inside a function context
6 info: |
7 ...
8 10. If strictCaller is true, let strictEval be true.
9 ...
10 12. Let runningContext be the running execution context.
11 ...
12 ---*/
13
14 assert.throws(SyntaxError, function() {
15 'use strict';
16 eval('var public = 1;');
17 });
18
19 reportCompare(0, 0);