blob: 92032088abf26dae2ae71a2ac4c05d4f07755e40 [file] [log] [blame]
var testCase = function (actual, expected, message) {
if (actual !== expected) {
throw message + ". Expected '" + expected + "', but was '" + actual + "'";
}
};
var d = {
x : "bar",
y : function() { return z => this.x + z; }
};
noInline(d.y);
var e = { x : "baz" };
for (var i=0; i<10000; i++) {
testCase(d.y().bind(e, "ley")(), "barley", "Error: function bind shouldn't change lexical binding of the arrow function");
}