module_4482_dep1.js 1000 B

1234567891011121314151617181920212223242526
  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. //this test case's circular dependencies would segfault
  6. //with CC's orriginal module implementation if JIT was enabled
  7. //issue was that:
  8. //i) dep 1 requires dep2 and dep3
  9. //ii) MDI would therefore be triggerred for dep2 (with dep3 queued)
  10. //iii) MDI for dep2 would not explicitly require dep3 as the import is via dep1
  11. //iv) second half of MDI for dep2 would attempt to reference the function Thing2 defined in dep 3
  12. //v) Thing2 would not yet exist = segfault
  13. import Thing1 from 'module_4482_dep2.js';
  14. import Thing2 from 'module_4482_dep3.js';
  15. export { Thing1, Thing2 };
  16. export default
  17. function main()
  18. {
  19. Thing1();
  20. Thing2();
  21. }