strictness-override.js (588B)
1 // Copyright (C) 2016 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 description: > 5 Evaluated code honors a Use Strict Directive in the Directive Prologue 6 esid: sec-strict-mode-code 7 info: | 8 Eval code is strict mode code if it begins with a Directive Prologue that 9 contains a Use Strict Directive or if the call to eval is a direct eval 10 that is contained in strict mode code. 11 ---*/ 12 13 assert.throws(ReferenceError, function() { 14 eval('"use strict"; unresolvable = null;'); 15 }); 16 17 reportCompare(0, 0);