digitalmars.D - Inherit from global scope class in nested
- Ilya Zaitseff (19/19) Aug 28 2005 Why such is disallowed?
- James Dunne (6/25) Aug 28 2005 Probably because it is an obscure usage of the dot operator as a global ...
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