Vogen icon indicating copy to clipboard operation
Vogen copied to clipboard

Inaccurate explanation for why there are no to-primitive implicit operators by default

Open aradalvand opened this issue 1 year ago • 1 comments

Describe the bug

The README says:

image

This is actually inaccurate. age1 == osVersion working is not a consequence of the to-primitive implicit operator alone, it's a consequence of the combination of that AND the primitive equality operators that Vogen generates by default — which you can now disable (#611), and this means that the following combination of options doesn't have the age1 == osVersion problem mentioned in the README:

[assembly: VogenDefaults(
    toPrimitiveCasting: CastOperator.Implicit,
    primitiveEqualityGeneration: PrimitiveEqualityGeneration.Omit
)]

image

Steps to reproduce

Expected behaviour

Up to you what should be done with this information :D At least perhaps consider updating that bit of the README to actually communicate this fact. Thank you!

aradalvand avatar Aug 23 '24 06:08 aradalvand

Good point! Thanks for highlighting that! I shall update the documentation to reflect the fact that equality is driven by more than one thing.

SteveDunn avatar Aug 24 '24 07:08 SteveDunn

Thank you, I've updated the documentation in the FAQ page

SteveDunn avatar Sep 09 '24 09:09 SteveDunn