www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - final?

reply "Jan Hanselaer" <jan.hanselaer gmail.com> writes:
Hi

In the documentation about classses http://www.digitalmars.com/d/class.html

I read :
Final classes cannot be subclassed:
final class A { }
class B : A { }  // error, class A is final


But when I try to compile it, theres no error. Seems quite unusual to me.
Is this a bug?


Jan
May 25 2007
parent reply Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Jan Hanselaer wrote:
 Hi
 
 In the documentation about classses http://www.digitalmars.com/d/class.html
 
 I read :
 Final classes cannot be subclassed:
 final class A { }
 class B : A { }  // error, class A is final
 
 
 But when I try to compile it, theres no error. Seems quite unusual to me.
 Is this a bug?
 
Are you using a recent version of DMD? It was a bug ( http://d.puremagic.com/issues/show_bug.cgi?id=558 ) until DMD 1.011, and I can confirm that it works in 1.014. -- Remove ".doesnotlike.spam" from the mail address.
May 25 2007
parent "Jan Hanselaer" <jan.hanselaer gmail.com> writes:
"Deewiant" <deewiant.doesnotlike.spam gmail.com> schreef in bericht 
news:f36o9m$rt1$1 digitalmars.com...
 Jan Hanselaer wrote:
 Hi

 In the documentation about classses 
 http://www.digitalmars.com/d/class.html

 I read :
 Final classes cannot be subclassed:
 final class A { }
 class B : A { }  // error, class A is final


 But when I try to compile it, theres no error. Seems quite unusual to me.
 Is this a bug?
Are you using a recent version of DMD? It was a bug ( http://d.puremagic.com/issues/show_bug.cgi?id=558 ) until DMD 1.011, and I can confirm that it works in 1.014. -- Remove ".doesnotlike.spam" from the mail address.
I was using version 1.010 ... Downloade 1.014 an you're right ... it's solved there. Thanks!
May 25 2007