http://d.puremagic.com/issues/show_bug.cgi?id=4528
Summary: Better error message for private abstract method Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: diagnostic Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-07-28 15:20:52 PDT --- With this wrong program: abstract class Foo { final abstract void bar(); } void main() {} dmd 2.047 generates the error message: test.d(2): Error: function test.Foo.bar cannot be both final and abstract With this other wrong program: abstract class Foo { private abstract void bar(); } void main() {} dmd generates the error message: prog.d(2): Error: function test.Foo.bar non-virtual functions cannot be abstract But I think this second error message can be improved, because at first look bar() looks virtual: test.d(2): Error: member function test.Foo.bar() cannot be both private and abstract. Or (inspired by C# compiler): test.d(2): Error: member function test.Foo.bar(): abstract functions cannot be private. Or (inspired by Java compiler): test.d(2): Error: method test.Foo.bar(): illegal combination of modifiers: abstract and private. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------