instn-local-bndng-export-fun.js (975B)
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 function 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.sameValue(test262(), 23, 'initialized value'); 25 assert.sameValue( 26 Object.getOwnPropertyDescriptor(global, 'test262'), undefined 27 ); 28 29 test262 = null; 30 31 assert.sameValue(test262, null, 'binding is mutable'); 32 33 export function test262() { return 23; } 34 35 reportCompare(0, 0);