blob: 66a6890bb87b24cd234d986522165b9d0dcdff13 [file] [log] [blame]
"use strict";
function truth() {
return true;
}
noInline(truth);
function assert(cond) {
if (!cond)
throw new Error("broke assertion");
}
noInline(assert);
function foo(y) {
return y;
}
let x = 40;
assert(x === 40);
for (var i = 0; i < 1000; i++) {
if (truth()) {
let y = 20;
let capY = function() { return y; }
assert(x === 40);
assert(capY() === 20);
assert(foo(i) === i);
}
}
assert(foo("hello") === "hello");