[nem-en] Inheritance

Michal Moskal michal.moskal at gmail.com
Mon Feb 12 15:26:34 CET 2007


On 2/12/07, Vladimir Reshetnikov <v.reshetnikov at gmail.com> wrote:
> This document (http://nemerle.org/Grok_Object_oriented_programming#Inheritance)
> says that "Static methods and the constructor are not derived."
>
> But
>
> [nemerle]
> class A {
>         public static Foo() : void {}
> }
>
> class B : A { }
>
> B.Foo() // Works
> [/nemerle]
>
> So, what is the intended behavior?
> Are static members inherited by derived classes? (In C#, they are)
> Are nested types inherited by derived classes? (In C#, they are)

When the document was written they were not. They are now.

-- 
   Michał


More information about the devel-en mailing list