On Tue, 24 Mar 2026 16:31:24 GMT, Frederic Parain <[email protected]> wrote:

>> OK. I've updated the comments to what you suggested. I'm still a little bit 
>> hesitant a about that formulation, it now sounds like there's an important 
>> property that the object has an identity, but I don't think that's why the 
>> assert is there. Isn't it more that we shouldn't be calling this function 
>> with value objects?
>
> The important point is more immutability than identity. Instances of value 
> classes are immutable by definition. Identity objects can be mutable. What 
> about "object must be mutable" instead?
> Or more precise: "receiver cannot be an instance of a value class because 
> they are immutable"?

I'll change to that instead. Thanks.

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2258#discussion_r2982917615

Reply via email to