mirror of https://github.com/sveltejs/svelte
parent
0fd1c92822
commit
2861ad66e0
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: correct increment/decrement code generation
|
@ -0,0 +1,5 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `0 0 2 2 0`
|
||||
});
|
@ -0,0 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { writable } from "svelte/store";
|
||||
|
||||
let x = writable(0);
|
||||
const a = $x++;
|
||||
const b = ++$x;
|
||||
const c = $x--;
|
||||
const d = --$x;
|
||||
</script>
|
||||
|
||||
{$x} {a} {b} {c} {d}
|
Loading…
Reference in new issue