Skip to content

sibling selectors involving {#key ...}/{@render ...} are incorrectly marked as unused #14399

Closed
@Rich-Harris

Description

@Rich-Harris

Describe the bug

Because of this line...

} else if (prev.type === 'EachBlock' || prev.type === 'IfBlock' || prev.type === 'AwaitBlock') {
...and this line...
} else if (prev.type === 'EachBlock' || prev.type === 'IfBlock' || prev.type === 'AwaitBlock') {
...we incorrectly prune sibling selectors when things other than if/each/await blocks are involved. Discovered while working on #14395

Reproduction

Logs

No response

System Info

latest

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