mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 12:05:15 +00:00
LibJS: Remove outdated FIXME now that we have lexical environments
This commit is contained in:
parent
54c95d44ce
commit
640a24dce8
Notes:
sideshowbarker
2024-07-19 07:33:51 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/640a24dce82 Pull-request: https://github.com/SerenityOS/serenity/pull/1814
1 changed files with 1 additions and 5 deletions
|
@ -17,11 +17,7 @@ try {
|
|||
assert(new Function("foo", "if (foo) { return 42; } else { return 'bar'; }")(true) === 42);
|
||||
assert(new Function("foo", "if (foo) { return 42; } else { return 'bar'; }")(false) === "bar");
|
||||
assert(new Function("return typeof Function()")() === "function");
|
||||
// FIXME: This is equivalent to
|
||||
// (function (x) { return function (y) { return x + y;} })(1)(2)
|
||||
// and should totally work, but both currently fail with
|
||||
// Uncaught exception: [ReferenceError]: 'x' not known
|
||||
// assert(new Function("x", "return function (y) { return x + y };")(1)(2) === 3);
|
||||
assert(new Function("x", "return function (y) { return x + y };")(1)(2) === 3);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue