Merge pull request #3333 from Conduitry/gh-3179

preserve async/generator-ness of hoisted function expressions
pull/3342/head
Rich Harris 5 years ago committed by GitHub
commit 21e3db1b72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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