16830, “bradcray”, “Should mixed class / non-class ‘=’, ‘==’, ‘!=’ overloads be supported?”, “2020-12-08T18:15:44Z”
In #14180 we made assignment overloads for classes illegal, and in #13048, we have essentially decided that ==
and !=
should similarly be made illegal for classes. This issue asks whether these overloads should only be illegal:
- when both operands are classes OR
- when the LHS operand is a class for
=
and when either operand is a class for==
,!=
OR - something else
Put another way, should a user be able to define cases like:
- an assignment to a class from an integer or record?
- an assignment from a class to an integer or record?
- a comparison between a class and an integer or record?