yield* does not delegate iterator values

Fixed Issue #6790309

Details

Created
Mar 7, 2016
Privacy
This issue is public.
Reports
Reported by 0 people

Sign in to watch or report this issue.

Steps to reproduce

// repro, expected to print “X” but prints “undefined”

 

function *foo() {
    var x = yield 1;
    print(x);
}

function *bar() {
    yield *foo();
}

var it = bar();
it.next();
it.next( “X” );

 

URL:

Repro Steps:

==============

Here is the corresponding JSFiddle : https://jsfiddle.net/db77fgzg/1/ .

And here an article explaining the feature : https://davidwalsh.name/es6-generators-dive#delegating-generators .

Expected Results:

==============

The output should be "X".

Actual Results:

==============

Dev Channel specific:

================

No

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To to “Travis L.”

      Changed Assigned To to “ChakraTriage”

      Changed Assigned To from “ChakraTriage” to “Ian H.”

      Changed Steps to Reproduce

      Changed Assigned To from “Ian H.” to “IE S.”

      Changed Status to “Fixed”

    You need to sign in to your Microsoft account to add a comment.

    Sign in