www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3113] New: final overriding

http://d.puremagic.com/issues/show_bug.cgi?id=3113

           Summary: final overriding
           Product: D
           Version: 2.030
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tim.matthews7 gmail.com


This code compiles:

module test;

enum A
{
    a = 0 
}

enum B
{
    b = 1
}

class BaseClass
{
    final A getEnum()
    {
        return A.a;
    }
}

class DerivedClass : BaseClass
{
    B getEnum()
    {
        return B.b;
    }
}



void main()
{
    auto der = new DerivedClass();
    der.getEnum();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 29 2009