Skip to content

Cannot use and and or inside a function definition after v12.1.0 #3143

@shmsula

Description

@shmsula

Describe the bug
Code stops working after migration from 12.1.0 to 12.2.0 or 12.3.0

f1(x) = x < 2 or x > 3
filter([1,2,3,4,5], f1)

To Reproduce
This can be easily reproduced on the main page using the demo widget. https://mathjs.org (math.version 12.3.0)

image

However, it works if the ‘or’ is removed.

image

On https://mathnotepad.com/ (math.version 10.3.0) it also works.
image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions