CanDeclareGlobalFunctionNonEval.js 832 B

12345678910111213
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. // #sec-candeclareglobalfunction states that redeclaration of global functions
  6. // that are not configurable, not writable, and not enumerable should fail.
  7. // #sec-globaldeclarationinstantiation states that if #sec-candeclareglobalfunction
  8. // fails, a TypeError should be thrown. The global property "undefined" is not
  9. // configurable, not writable, and not enumerable. More tests can be found in
  10. // CanDeclareGlobalFunction.js
  11. function undefined() { }