Skip to content

ArrowFunction incorrectly introduces 'arguments' local symbol #28621

Closed
@ajafff

Description

@ajafff

TypeScript Version: 3.2.0-dev.20181110

Search Terms: arrow arguments

Code

(() => arguments)();

Expected behavior:

There's no arguments in scope, emit error cannot find name 'arguments'.

Actual behavior:

No compiler error. Crashes at runtime.

Playground Link: https://agentcooper.github.io/typescript-play/#code/BTCUAIF4D5wQwE4HMCuBbApgOwC4GdQwg

I can send a PR if you accept this bug as I'm already looking at the relevant code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions