September 22, 2005
module visibility;

public:

class A(T)
{
  private A   next;
}

alias A!(B)   AB;

class B
{
  AB    head;

  void add( AB    var )
  {
    var.next = head;
    head = var;
  }
}

Error (DMD 0.131,Windows XP):
---------- Capture Output ----------
> "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\visibility.d"
E:\proj\temp\visibility.d(17): class visibility.A!(B ).A member next is not accessible

> Terminated with exit code 1.


A(T).next should be visible since it's in the same module.

-DavidM
September 22, 2005
David Medlock schrieb:

> module visibility;
> 
> public:
> 
> class A(T)
> {
>   private A   next;
> }
> 
> alias A!(B)   AB;
> 
> class B
> {
>   AB    head;
> 
>   void add( AB    var )
>   {
>     var.next = head;
>     head = var;
>   }
> }
> 
> Error (DMD 0.131,Windows XP):
> ---------- Capture Output ----------
>> "C:\dmd\bin\dmd.exe" -debug -c "E:\proj\temp\visibility.d"
> E:\proj\temp\visibility.d(17): class visibility.A!(B ).A member next is
> not accessible
> 
>> Terminated with exit code 1.
> 
> 
> A(T).next should be visible since it's in the same module.

Known:
http://dstress.kuehne.cn/run/private_04.d

Thomas