www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18035] New: super does not work properly for template base

https://issues.dlang.org/show_bug.cgi?id=18035

          Issue ID: 18035
           Summary: super does not work properly for template base classes
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Consider:

class A(T) { void fun() {} }

class Aint  { void fun() {} }

class B : Aint
{
    alias fun = super.fun;
}

class C : A!int
{
    alias fun = super.fun;
}

The alias inside class C fails to compile with the error message:

test.d(12): Error: identifier 'fun' of 'A.fun' is not defined

The code should go through.

--
Dec 05 2017