Re: [vim9script] How to compare two objects for identity vs equality?

2023-07-23 Thread Lifepillar
On 2023-07-23, Lifepillar wrote: > Fine, == is value-based equality. Is there a way to compare for > identity, that is, so that o1 and o2 are considered two different > instances? Aaah, never mind, there are `is` and `isnot`. Time to find a cool place to avoid brain melting, I guess... Life. --

[vim9script] How to compare two objects for identity vs equality?

2023-07-23 Thread Lifepillar
The following test passes: ```vim vim9script class C endclass def Test_ObjectEquality() var o1 = C.new() var o2 = C.new() assert_true(o1 == o2) enddef v:errors = [] Test_ObjectEquality() echo v:errors ``` Fine, == is value-based equality. Is there a way to compare for identity, that is,