mirror of https://github.com/sveltejs/svelte
breaking: prevent unparenthesized sequence expressions in attributes (#11032)
parent
2a1d3c6e73
commit
92909834f0
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
breaking: prevent unparenthesized sequence expressions in attributes
|
@ -0,0 +1,10 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
error: {
|
||||||
|
code: 'invalid-sequence-expression',
|
||||||
|
message:
|
||||||
|
'Sequence expressions are not allowed as attribute/directive values in runes mode, unless wrapped in parentheses',
|
||||||
|
position: [163, 170]
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,10 @@
|
|||||||
|
<script>
|
||||||
|
import Child from './Child.svelte';
|
||||||
|
let { x, y, z } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- allowed -->
|
||||||
|
<Child foo={(x, y, z)} />
|
||||||
|
|
||||||
|
<!-- not allowed -->
|
||||||
|
<Child foo={x, y, z} />
|
Loading…
Reference in new issue