Skip to content

Constant propogation through slurping #26050

@bramtayl

Description

@bramtayl

Recurring through tuples with first and Base.tail is incredibly useful but tail doesn't do constant propagation. I tracked the issue down to argtail in Base, which needs a pure annotation to do constant propagation correctly.

Base.@pure argtail(x, rest...) = rest

In fact, constant propagation never seems to survive slurping without pure annotations. This seems like a useful feature to have.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions