tor-browser

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

instn-local-bndng-export-cls.js (938B)


      1 // |reftest| module
      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: >
      6    Binding is created and initialized to `undefined` for exported `class`
      7    declarations
      8 esid: sec-moduledeclarationinstantiation
      9 info: |
     10    [...]
     11    17. For each element d in lexDeclarations do
     12        a. For each element dn of the BoundNames of d do
     13           i. If IsConstantDeclaration of d is true, then
     14              [...]
     15           ii. Else,
     16               1. Perform ! envRec.CreateMutableBinding(dn, false).
     17    [...]
     18 includes: [fnGlobalObject.js]
     19 flags: [module]
     20 ---*/
     21 
     22 var global = fnGlobalObject();
     23 
     24 assert.throws(ReferenceError, function() {
     25  typeof test262;
     26 }, 'Binding is created but not initialized.');
     27 assert.sameValue(
     28  Object.getOwnPropertyDescriptor(global, 'test262'), undefined
     29 );
     30 
     31 export class test262 {}
     32 
     33 reportCompare(0, 0);