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

pull/3333/head
Conduitry 5 years ago
parent 981f30d3e9
commit bfa0bc98b7

@ -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