Skip to content

semantics of assigning to a?.x #9

Description

@sigmundch

What should we expect with the ?. operator when used with assignments:

exp1?.x = exp2

My current expectation is that this should be equivalent to:

((a, b) => a == null ? null : a.x = b) (exp1, exp2);

(both expressions are evaluated once, exp2 is evaluated even when exp1 is null)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions