Annex B 3.3.3: Eval of block-scoped function declaration should skip with scopes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 564
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 10
Description
We need to check that eval of block-scoped function declaration should skip with scope https://tc39.github.io/ecma262/#sec-web-compat-evaldeclarationinstantiation.
Cover this case:
function foo() {
let p2 = new Proxy({}, {
has(t, p) {
console.log(p)
return Reflect.has(t, p);
}
});
with (p2) {
eval("Reflect.has(p2, 'bar'); { function baz() { }; }");
}
}
foo();
According to p.B.3.3.3.1.d.ii.4.b (If thisEnvRec is not an object Environment Record,
then) It should print:
eval
Reflect
p2
bar
Value baz should not be printed.
Original issue https://bugs.webkit.org/show_bug.cgi?id=163208#c46
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the inline JavaScript case and the linked ECMAScript section p.B.3.3.3.1.d.ii.4.b, then locate the existing Annex B eval tests in the repository. Add coverage for the with-scope behavior and verify that the output contains eval, Reflect, p2, and bar but not baz.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100