[Issue 3836] [tdpl] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #12 from github-bugzi...@puremagic.com 2012-09-25 06:12:56 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d6d3ed2527981df536e2e6b3f7d313bbf2f52cd1 Fix Issue 3836 - [TDPL] obligatory override attribute Move requiring the override attribute to the next stage, from warning to deprecated. https://github.com/D-Programming-Language/dmd/commit/262583955e55f03f970af130590225b898164ae0 Merge pull request #462 from yebblies/issue3836 Issue 3836 - [TDPL] obligatory override attribute -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [tdpl] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [tdpl] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 Stewart Gordon s...@iname.com changed: What|Removed |Added CC||s...@iname.com --- Comment #11 from Stewart Gordon s...@iname.com 2012-02-28 17:36:32 PST --- http://dlang.org/hijack.html The D solution is straightforward. If a function in a derived class overrides a function in a base class, it must use the storage class override. If it overrides without using the override storage class it's an error. If it uses the override storage class without overriding anything, it's an error. Though I'm not sure the term storage class is correct here. And there's no mention of obligatory override on attribute.html. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #10 from yebblies yebbl...@gmail.com 2011-10-19 22:06:55 EST --- Patch to make it deprecated: https://github.com/D-Programming-Language/dmd/pull/462 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC||bugzi...@digitalmars.com --- Comment #8 from Walter Bright bugzi...@digitalmars.com 2011-10-09 11:18:16 PDT --- The reason this is marked as a warning is to not break existing code without providing a long transition period for users. The next step will be to make it deprecated, and then an error. I'll merge all the test case patches, but not the func.c change. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||patch CC||yebbl...@gmail.com --- Comment #7 from yebblies yebbl...@gmail.com 2011-06-17 06:05:44 PDT --- https://github.com/D-Programming-Language/dmd/pull/136 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #2 from bearophile_h...@eml.cc 2011-04-26 04:26:24 PDT --- How do you compile this with -w (warnings on) (reduced from code by Benjamin Thaut)? class Foo(T, R...) : Foo!R { void bar() { super.bar(); } } class Foo(T){ void bar() {} } void main() { new Foo!(int, float)(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2011-04-26 09:31:26 PDT --- You add override to the subclass' bar function's signature. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #4 from bearophile_h...@eml.cc 2011-04-26 10:10:36 PDT --- (In reply to comment #3) You add override to the subclass' bar function's signature. Do you want to show me the code that compiles with -w? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #5 from Jonathan M Davis jmdavisp...@gmx.com 2011-04-26 10:25:50 PDT --- class Foo(T, R...) : Foo!R { override void bar() { super.bar(); } } class Foo(T){ void bar() {} } void main() { new Foo!(int, float)(); } I don't see what's so confusing about that. Per -w (and per TDPL) any time that you override a function, you need to put the override attribute on the version in the subclass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 --- Comment #6 from bearophile_h...@eml.cc 2011-04-26 10:27:29 PDT --- I was about to write an answer like yours, sorry :-) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 3836] [TDPL] obligatory override attribute
http://d.puremagic.com/issues/show_bug.cgi?id=3836 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added CC||jmdavisp...@gmx.com Summary|obligatory override |[TDPL] obligatory override |attribute |attribute --- Comment #1 from Jonathan M Davis jmdavisp...@gmx.com 2011-03-22 18:16:39 PDT --- override is obligatory according to TDPL. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---