blob: f4adfddcb94b8368e813854cb738bc0eaa2f5ac0 [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error("Bad assertion")
}
// Anonymous
assert((()=>{}).name === "");
// Inferred name with global variable.
f = () => {};
assert(f.name === "f");
// Inferred name with variable declaration.
let lf = () => {};
assert(lf.name === "lf");