digitalmars.D - Inherit from global scope class in nested
- "Ilya Zaitseff" <sark7 mail333.com> Aug 28 2005
- James Dunne <james.jdunne gmail.com> Aug 28 2005
Why such is disallowed?
class Foo {
static class Foo {
static int x;
}
static class Bar: .Foo
{
}
}
I found workaround, but I'm wondering why the above code doesn't compiles.
class Foo {
static class Foo {
static int x;
}
alias .Foo gFoo;
static class Bar: gFoo
{
}
}
Aug 28 2005
In article <op.sv8t4kggaaezs2 ilya.tec.amursk.ru>, Ilya Zaitseff says...Why such is disallowed? class Foo { static class Foo { static int x; } static class Bar: .Foo { } } I found workaround, but I'm wondering why the above code doesn't compiles. class Foo { static class Foo { static int x; } alias .Foo gFoo; static class Bar: gFoo { } }
Probably because it is an obscure usage of the dot operator as a global scope operator and it was forgotten to be implemented. Besides, it's probably a mark of bad style. Regards, James Dunne
Aug 28 2005








James Dunne <james.jdunne gmail.com>