Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type nested inside two interfaces not visible in outermost type #19634

Open
dlangBugzillaToGithub opened this issue Oct 27, 2019 · 0 comments
Open

Comments

@dlangBugzillaToGithub
Copy link

Simen Kjaeraas reported this on 2019-10-27T19:53:45Z

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

Description

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);
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant