Merge pull request #3151 from sveltejs/gh-2906

correctly transform inline shorthand methods
pull/3170/head
Rich Harris 6 years ago committed by GitHub
commit 71e0d27655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -442,6 +442,10 @@ export default class Expression {
`);
}
if (parent && parent.method) {
code.prependRight(node.start, ': ');
}
function_expression = null;
dependencies = null;
contextual_dependencies = null;

@ -0,0 +1,5 @@
<script>
export let bar;
</script>
{bar.answer()}

@ -0,0 +1,9 @@
<script>
import Foo from './Foo.svelte';
</script>
<Foo bar={{
answer() {
return 42;
}
}} />
Loading…
Cancel
Save