2
0

callToDynamicScript.js 750 B

1234567891011121314151617
  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. // Minimal switches: -bgjit- -loopinterpretcount:1
  6. // Either a.b.call() should not be inlined, or a.b should be constructed in such a way that
  7. // attempting to recursively inline its contents does not assert.
  8. function test0(){
  9. const a = { b: new Function("[].slice();") };
  10. for (let i = 0; i < 2; ++i)
  11. a.b.call();
  12. };
  13. test0();
  14. WScript.Echo("Passed");