Can call static method with null reference

Timon Gehr timon.gehr at gmx.ch
Sat Jun 22 14:51:42 PDT 2013


On 06/22/2013 10:20 PM, Jacob Carlborg wrote:
> On 2013-06-22 19:11, monarch_dodra wrote:
>
>> I don't see what's so terrible about it: If A can do it, I don't see
>> what an instance of a couldn't?
>
> The problem is that you cannot overload on "static". That is, have a two
> methods with the same name, one being declared "static". Usually it's
> possible to find a different name for one of the methods to avoid
> overloading. That's not always the case though, for example, opDispatch.
>

If that is the only problem then the solution is to allow overloading on 
static, which is easy to do.


More information about the Digitalmars-d-learn mailing list