digitalmars.D.bugs - [Issue 3345] New: Static and nonstatic methods with the same name should be allowed
- d-bugmail puremagic.com Sep 26 2009
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: nobody puremagic.com ReportedBy: andrei metalanguage.com --- Comment #0 from Andrei Alexandrescu <andrei 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: -------
Sep 26 2009








d-bugmail puremagic.com