summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/eval-code/direct/strict-caller-function-context.js
blob: 123d31f37b40c23faea5aa8985318659232fd1ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (C) 2020 Leo Balter. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-performeval
description: Script will be script if strictCaller is true, inside a function context
info: |
    ...
    10. If strictCaller is true, let strictEval be true.
    ...
    12. Let runningContext be the running execution context.
    ...
---*/

assert.throws(SyntaxError, function() {
  'use strict';
  eval('var public = 1;');
});

reportCompare(0, 0);