www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Inner class private/protected members inaccessible from outer class

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
class Outer
{
    Inner newInner()
    {
        return new Inner();
    }

    class Inner
    {
        private this()
        {

        }
    }
}

Inner.this() is inaccessible from newInner().

I can't have users creating their own instances of Inner; it _must_ be done 
through Outer.  But not even Outer can create instances of Inner.

Sheer insanity. 
Jul 06 2005
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:daha6u$2o5e$1 digitaldaemon.com...

Never mind. 
Jul 06 2005
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:dahaha$2oim$1 digitaldaemon.com...
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message
No wait, I take that back as well. This is still a bug.
Jul 06 2005
parent Thomas Kuehne <thomas-dloop kuehne.this-is-spam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarrett Billingsley schrieb am Wed, 6 Jul 2005 15:14:32 -0400:
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
 news:dahaha$2oim$1 digitaldaemon.com...
 "Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message
No wait, I take that back as well. This is still a bug.
That is a long standing one: http://dstress.kuehne.cn/run/private_02.d As well as several other test cases. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCzWhe3w+/yD4P9tIRAm+/AJ97/sgcDSrjxMmwj+ae5DcZf0eZ3QCgxund 1d3jepw7JLl3NzbZTAs5hLo= =oz8O -----END PGP SIGNATURE-----
Jul 07 2005