Quellcode durchsuchen

LibJS: Remove outdated FIXME now that we have lexical environments

Linus Groh vor 5 Jahren
Ursprung
Commit
640a24dce8
1 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen
  1. 1 5
      Libraries/LibJS/Tests/Function.js

+ 1 - 5
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) {