Skip to content

Rest parameters in a snippet should be a compile error #12464

Closed
@Rich-Harris

Description

@Rich-Harris

Describe the bug

We error on this...

{#snippet a(b)}
  {b}
{/snippet}

{@render a(...[1])}

...but not this:

{#snippet a(...b)}
  {b[0]}
{/snippet}

{@render a(1)}

Instead, it fails cryptically at runtime.

Reproduction

see above

Logs

No response

System Info

next

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions