From 640a24dce8295bc5ba9768ad76e93b9e52fa33e2 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 15 Apr 2020 22:20:53 +0100 Subject: [PATCH] LibJS: Remove outdated FIXME now that we have lexical environments --- Libraries/LibJS/Tests/Function.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Libraries/LibJS/Tests/Function.js b/Libraries/LibJS/Tests/Function.js index b832f27798..c46ba99aaa 100644 --- a/Libraries/LibJS/Tests/Function.js +++ b/Libraries/LibJS/Tests/Function.js @@ -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) {