[Issue 18035] New: super does not work properly for template base classes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 5 18:14:33 UTC 2017


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 at puremagic.com
          Reporter: andrei at 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.

--


More information about the Digitalmars-d-bugs mailing list