Skip to content

Parameter errors in generators should throw #16

@zenparsing

Description

@zenparsing

Errors which occur during parameter binding and evaluation should result in exceptions.

function* f(a = null.x) {}
f(); // Throws an exception

Currently, it does not because defaults are evaluated in the body of the generator.

The same applies to async generator functions.

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