(Resending my earlier message to Levi:)

Hi Levi,

I apologize if this has been discussed before, as I have fallen very
> behind on internals discussions. I think it would be helpful to add an
> example where the object being cloned accesses its properties.
> Something like this:
>
>    $b = clone $a with ["count" => $a->count * 2];
>
> If this is not valid, or if it has unexpected behavior or semantics,
> that should also be included in the RFC.
>

It hasn't been discussed yet, but thankfully, there's nothing special about
it:
the LHS is evaluated first, then comes the RHS. Nevertheless, I've just
clarified this in the RFC,
and thanks for pointing this out!

Regards,
Máté

Reply via email to