Skip to content

XS incorrectly rejects undefined bindings #1435

@gibson042

Description

@gibson042

Environment: XS 15.5.1, slot 32 bytes, ID 4 bytes

Description
There are details at tc39/test262#4332 , but the summary is that XS incorrectly fails to create scoped bindings and function parameters named undefined.

Steps to Reproduce

{
  const undefined = 1;
  print(undefined === 1 ? 'PASS' : 'FAIL');
}
(function(undefined) { print(undefined === 1 ? 'PASS' : 'FAIL'); })(1);
(function({ undefined }) { print(undefined === 1 ? 'PASS' : 'FAIL'); })({ undefined: 1 });

Actual behavior

FAIL
FAIL
FAIL

Expected behavior

PASS
PASS
PASS

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedissue reported has been reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions