http://d.puremagic.com/issues/show_bug.cgi?id=3345

           Summary: Static and nonstatic methods with the same name should
                    be allowed
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: and...@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <and...@metalanguage.com> 2009-09-26 
10:37:06 PDT ---
Consider:

class Widget {
    int fun() { return 1; }
    static int fun() { return 2; }
}

void main() {
    writeln(Widget.fun());       // should print 2
    writeln((new Widget).fun()); // should print 1
}

This should work. Otherwise there is no way to explain how .classinfo works in
terms of D facilities.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to