I'm just wondering if, or how much of the following is possible in some way in D:

class Foo {
    int x;
    sub Bar {
        int x;
        int getFooX(){ return super.x; }
        sub FooBar {
            int x;
            int y;
            int addXes(){ return x + super.x + super.super.x; }
        }
    }
}

Where the Xes are accessible outside the class by Foo.x, Foo.Bar.x, Foo.Bar.FooBar.x.

Reply via email to