January 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=2946


Jacob Carlborg <doob@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob@me.com


--- Comment #10 from Jacob Carlborg <doob@me.com> 2013-01-21 11:12:53 PST ---
(In reply to comment #0)
> > On Mon, 28 Apr 2008 10:11:23 -0300, Ary Borenszweig
> A class can either be abstract or not abstract. Currently in D, if you don't mark a class as abstract, it can still be it if it contains an abstract method:
> 
> class Foo {
> 
>     abstract void someAbstract();
> 
>     void nonAbstract() {
>     }
> 
> }
> 
> When designing a class, you have in mind whether the class is going to be abstract or not. If it's not going to be abstract, you want the compiler to help you by telling you "You made a mistake. This class is still abstract because you didn't implement method foo".
> 
> So I want to extend Foo with a class Bar, but I want Bar to be not abstract.
> 
> class Bar : Foo {
> }
> 
> I compile, and it gives no error, of course. But I want there to be an error there.

There might be a problem with this since D supports separate compilation. There can be another object file that contains the implementation of Bar.someAbstract. I'm not sure if this applies here.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=2946



--- Comment #11 from Stewart Gordon <smjg@iname.com> 2013-01-21 12:40:39 PST ---
(In reply to comment #10)
> There might be a problem with this since D supports separate compilation. There can be another object file that contains the implementation of Bar.someAbstract. I'm not sure if this applies here.

No, for this to apply, Bar would need to contain its own declaration of someAbstract.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 21, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=2946



--- Comment #12 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-01-21 12:55:16 PST ---
(In reply to comment #0)
> (also, it would be nice if the compiler could tell you all the methods that still need an implementation, rather than just one)

This seems to be fixed now.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
1 2
Next ›   Last »