tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

block-decl-strict-strict.js (634B)


      1 'use strict';
      2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 description: AnnexB extension not honored in strict mode (Block statement in the global scope containing a function declaration)
      6 es6id: B.3.3.2
      7 flags: [onlyStrict]
      8 info: |
      9    B.3.3.2 Changes to GlobalDeclarationInstantiation
     10 
     11    1. 1. Let strict be IsStrict of script
     12    2. If strict is *false*, then
     13       [...]
     14 ---*/
     15 
     16 assert.throws(ReferenceError, function() {
     17  f;
     18 });
     19 
     20 {
     21  function f() {  }
     22 }
     23 
     24 assert.throws(ReferenceError, function() {
     25  f;
     26 });
     27 
     28 reportCompare(0, 0);