### Describe the bug Svelte 4 slots using inline `@const` declaration resulting in error at runtime `Cannot access 'index' before initialization` ```svelte <div slot="item" let:index let:style {style}> <!-- This results in error: ❌ --> <!-- `Cannot access 'index' before initialization` --> {@const item = list[index]} XOXO: {item} <!-- This works ✅ --> XOXO: {list[index]} </div> ``` ### Reproduction ```svelte <div slot="item" let:index let:style {style}> <!-- This works ✅ --> XOXO: {list[index]} </div> ``` Emits: <img width="508" height="357" alt="Image" src="https://github.com/user-attachments/assets/6933a8b6-a3eb-40c7-a313-3977163bd01d" /> ```svelte <div slot="item" let:index let:style {style}> <!-- This results in error: ❌ --> <!-- `Cannot access 'index' before initialization` --> {@const item = list[index]} XOXO: {item} </div> ``` Emits: <img width="455" height="378" alt="Image" src="https://github.com/user-attachments/assets/5a06ea94-e7d0-47a5-b484-27303e4665f8" /> Here, const is emitted before any slot variable declaration Here is an example project: https://svelte.dev/playground/69d51ef1910347c4823c3e1c201d90f6?version=5.38.0 ### Logs ```shell Cannot access 'index' before initialization in <unknown> in VList.svelte in App.svelte in ``` ### System Info ```shell irrelevant ``` ### Severity blocking an upgrade