Skip to content

filter with index in the parser does not filter #3260

@dvd101x

Description

@dvd101x

Hi,

Just found out this edge case in the parser on v13.1.1

filter([10, 20], f(x, index) = index == 1)     # yields [10, 20]
# expected [10]
filter([10, 20], f(x, index) = index == 1000)  # yields [10, 20]
# expected []

Outside the parser there is no issue.

math.filter([10, 20], (x, index) => index == 0)    // yields [10]
math.filter([10, 20], (x, index) => index == 1000) // yields []

I found it while working on #3256, I'm still trying to find the source of the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions