Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/arrow-function/strict.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 14.2.16
5 description: >
6 Runtime Semantics: Evaluation
7
8 1. If the function code for this ArrowFunction is strict mode code (10.2.1),
9 let strict be true. Otherwise let strict be false.
10 ...
11
12 flags: [onlyStrict]
13 ---*/
14 assert.throws(ReferenceError, function() {
15 var af = _ => {
16 foo = 1;
17 };
18
19 af();
20 });
21
22 assert.sameValue(typeof foo, "undefined");