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