BoundNames.js (575B)
1 var BUGNUMBER = 1185106; 2 var summary = "Bound names of async functions"; 3 4 print(BUGNUMBER + ": " + summary); 5 6 async function test() {} 7 assertEq(test.name, "test"); 8 9 var test2 = (async function test2() {}); 10 assertEq(test2.name, "test2"); 11 12 var anon = async function() {}; 13 assertEq(anon.name, "anon"); 14 15 if (typeof Reflect !== "undefined" && Reflect.parse) { 16 var tree = Reflect.parse("export default async function() {}", { target: "module" }); 17 assertEq(tree.body[0].declaration.id.name, "default"); 18 } 19 20 if (typeof reportCompare === "function") 21 reportCompare(true, true);