thanks, I was looking at this the wrong way
On Tue, Jul 26, 2011 at 9:54 AM, Steven Schveighoffer <schvei...@yahoo.com>wrote: > On Tue, 26 Jul 2011 07:54:54 -0400, Diego Canuhé <canuh...@gmail.com> > wrote: > > Hi, >> isn't that the way it's supposed to work? I mean >> >> void show(int a) { writeln(a); } >> >> void main() { show(null); } >> >> won't compile either. >> Shouldn't bar be some kind of pointer? >> > > 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. > > > >> btw, today I read "opAssign can no longer be overloaded for class objects" >> here: >> >> http://www.d-programming-**language.org/features2.html<http://www.d-programming-language.org/features2.html> >> >> is that no longer valid? >> > > Here is the spec. I would not trust that features2, it's probably out of > date. > > http://www.d-programming-**language.org/**operatoroverloading.html#** > Assignment<http://www.d-programming-language.org/operatoroverloading.html#Assignment> > > -Steve >