thanks, I was looking at this the wrong way<br><br><br><div class="gmail_quote">On Tue, Jul 26, 2011 at 9:54 AM, Steven Schveighoffer <span dir="ltr"><<a href="mailto:schveiguy@yahoo.com">schveiguy@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">On Tue, 26 Jul 2011 07:54:54 -0400, Diego Canuhé <<a href="mailto:canuhedc@gmail.com" target="_blank">canuhedc@gmail.com</a>> wrote:<br>

<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
isn't that the way it's supposed to work? I mean<br>
<br>
void show(int a) { writeln(a); }<br>
<br>
void main() { show(null); }<br>
<br>
won't compile either.<br>
Shouldn't bar be some kind of pointer?<br>
</blockquote>
<br></div>
null should be considered as the type of the class, not void *.  You should not be able to override the behavior of opAssign as it pertains to assigning to a class instance.  In other words, you should *never* be able to override x = null where x is a class instance.<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
btw, today I read "opAssign can no longer be overloaded for class objects"<br>
here:<br>
<br>
<a href="http://www.d-programming-language.org/features2.html" target="_blank">http://www.d-programming-<u></u>language.org/features2.html</a><br>
<br>
is that no longer valid?<br>
</blockquote>
<br></div>
Here is the spec.  I would not trust that features2, it's probably out of date.<br>
<br>
<a href="http://www.d-programming-language.org/operatoroverloading.html#Assignment" target="_blank">http://www.d-programming-<u></u>language.org/<u></u>operatoroverloading.html#<u></u>Assignment</a><br>
<br>
-Steve<br>
</blockquote></div><br>