I’m not sure exactly what is the cause here, hopefully someone else can elaborate on that.
I think that one of Dict.__getitem__
or List.__getitem__
is actually creating a copy of the Client
, which is the rvalue that the the message refers to. Since the rvalue isn’t bound to anything, mutating it doesn’t do anything, and that’s an error (I think my terminology here is a bit messy).
To fix it you just need to get a pointer to the dictionary value, for example:
d01.get_ptr("ClientA").value()[][0].set_var(4)
fixes it.