preserve async/generator-ness of hoisted function expressions (#3179)

pull/7738/head
Conduitry 6 years ago
parent a8512d039f
commit 5e64cb391a

@ -363,7 +363,7 @@ export default class Expression {
}
const fn = deindent`
function ${name}(${args.join(', ')}) ${body}
${node.async && 'async '}function${node.generator && '*'} ${name}(${args.join(', ')}) ${body}
`;
if (dependencies.size === 0 && contextual_dependencies.size === 0) {

@ -0,0 +1,5 @@
export default {
html: `
<button>nothing</button>
`,
};

@ -0,0 +1 @@
<button on:click={async () => { await null; }}>nothing</button>
Loading…
Cancel
Save