[Issue 20329] New: Type nested inside two interfaces not visible in outermost type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 27 19:53:45 UTC 2019


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

          Issue ID: 20329
           Summary: Type nested inside two interfaces not visible in
                    outermost type
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: simen.kjaras at gmail.com

interface A {
    interface B : A {
        class C : B {
            void inside(C c) {}
        }
        // Works
        void innermost(A.B.C c);
    }
    // Fails: no property 'C' for type 'foo.A.B'
    void inside(A.B.C c) { }
}
// Works
void outside(A.B.C c) { }

Adding another layer of interfaces keeps the same kind of pattern:

interface A {
    interface B : A {
        interface C : B {
            class D : C {
                void fun(D d) {}
            }
        }
        // Fails
        void fun(A.B.C.D d);
    }
}

--


More information about the Digitalmars-d-bugs mailing list