[dmd-beta] D 2.059 beta 4

Jacob Carlborg doob at me.com
Tue Apr 10 09:39:45 PDT 2012


On 9 apr 2012, at 23:24, Andrej Mitrovic wrote:

> On 4/9/12, Walter Bright <walter at digitalmars.com> wrote:
>> I believe the error message is correct.
> 
> I don't know about that. in TDPL p197 it says:
> "If you use an object instead of the class name when accessing a
> static member, that's fine, too.:
> auto c = (new Widget).someStaticMember"
> 
> It would naturally follow that using 'this' for static members would
> be ok as well. Why break code now?

I know that is currently allowed but I don't think it should be allowed. This would make it possible to overload on static, i.e.

class Foo
{
    static void foo () {}
    void foo () {}
}

-- 
/Jacob Carlborg



More information about the dmd-beta mailing list