Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nilproject committed May 10, 2018
1 parent 43d8f81 commit 2085e8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions FunctionalTests/fuzz.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function x2(x) {
(function (a, b) { with ({}) if (a == b) console.log("Weak parameters") })(x2(2), x2(3));

if (Math.max(...[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) != 9)
console.log("Spread in proxied method work incorrectly");
console.log("Spread in proxied method works incorrectly");

function func1(a, b, ...rest) {
if (JSON.stringify(rest) !== JSON.stringify([2, 3, 4]))
Expand Down Expand Up @@ -163,8 +163,8 @@ class A {

class B extends A { constructor() { super(); } }

var a = new A().text; // logs "A"
var b = new B().text; // logs "B"
var a = new A().text;
var b = new B().text;

if (a != "A")
console.log("new.target works incorrectly");
Expand Down Expand Up @@ -294,3 +294,7 @@ console.asserta(() => 1..__proto__, Number.prototype);
})();

console.asserta(() => JSON.stringify({ 1: 1, 2: { 1: 1 } }, [1]), "{\"1\":1}")

var o = {};
JSON.stringify([o, o]);
JSON.stringify([o, [o]]);
2 changes: 1 addition & 1 deletion NiL.JS/BaseLibrary/JSON.cs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ private static string stringifyImpl(string key, JSValue obj, Function replacer,
}
finally
{
processed.Remove(processed.Count - 1);
processed.Remove(obj);
}
}
}
Expand Down

0 comments on commit 2085e8f

Please sign in to comment.