Because the opBinary is a perfectly valid method. The inability to
overload "is" only affects the rewrite of "A is B" to
"A.opBinart!`is`(B)".

On Wed, May 9, 2012 at 5:46 PM, bearophile <bearophileh...@lycos.com> wrote:
> Gor Gyolchanyan:
>
>
>> My question is, why not allow is operator to be overloadable for
>> structures?
>
>
> Or why the bad D compiler doesn't statically refuse the code like:
>
>
>>    bool opBinary(string op : "is")(typeof(null))
>
>
> Bye,
> bearophile
>



-- 
Bye,
Gor Gyolchanyan.

Reply via email to