Skip to content

stack underflow with generator #488

@gggin

Description

@gggin
function* x() {
    for (var e of yield []);
}

var g = x();
g.next();      
g.return("test"); 

The root cause of this issue is that yield is being incorrectly identified as being inside a for...of statement, but in reality, the yield hasn't actually entered the for...of loop yet. As a result, an incorrect nip_catch was generated. Could you help look into fixing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions