Skip to content

Inconsistency when try to access an property inside the "with" scope #5067

@gfablima

Description

@gfablima

Hi,
there's an inconsistence when we try to access an property inside the "with" scope.

OS: Ubuntu 16.04 x64
Chakra: 1.10.0.0-beta

Step to reproduce:

var o = { f: "foo" };
with (o) {
  var desc = Object.getOwnPropertyDescriptor(this, "f");
  function f() {
    return "bar";
  }
  if (!(desc.value === undefined)) {
    throw new Error('expected: undefined, got: ' + desc.value);
  }
}

Actual results:
Error: expected: undefined, got: function f() {
return "bar";
}

Expected results:
Pass without failures

V8 and Spidermonkey pass as expected, but Chakra and JavascriptCore returns the function f() inside "with" scope.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions