Skip to content

PPC 21 - short circuiting and lvalue #71

@rabbiveesh

Description

@rabbiveesh

What should happen with this code

$undef?->[0] = die

In the undef case, should this shortcircuit the assignment RHS, or run the code and not store it?
Similar question for

($but?->{why}, $for_sure) = (9001, 9002)

Considering the second, it would seem like we wouldn't necessarily wanna short circuit. Perhaps it doesn't make sense to use optchain as an lvalue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions