generators-deferparse.js 617 B

123456789101112131415
  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. try {
  6. eval("function f1() { class c extends BaseClass { *f3(a = yield) { } } };");
  7. WScript.Echo('FAILED');
  8. } catch (e) {
  9. if (e instanceof SyntaxError) {
  10. WScript.Echo('PASSED');
  11. } else {
  12. WScript.Echo('FAILED');
  13. }
  14. }