summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/Function/constructor-binding.js
blob: e82274d279d5d4046001645976006decb8afa92d (plain)
1
2
3
4
5
6
7
8
9
10
11
var BUGNUMBER = 636635;
var summary = "A function created by Function constructor shouldn't have anonymous binding";

print(BUGNUMBER + ": " + summary);

assertEq(new Function("return typeof anonymous")(), "undefined");
assertEq(new Function("return function() { return typeof anonymous; }")()(), "undefined");
assertEq(new Function("return function() { eval(''); return typeof anonymous; }")()(), "undefined");

if (typeof reportCompare === "function")
    reportCompare(true, true);