August 29, 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
  {
  }
}
August 29, 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