Extending D's support for object-oriented design with private(this)

NotYouAgain NotYouAgain at gmail.com
Fri Apr 26 06:45:25 UTC 2024


On Friday, 26 April 2024 at 05:48:03 UTC, NotYouAgain wrote:
> On Thursday, 25 April 2024 at 09:31:06 UTC, Kagamin wrote:
>>...
>> Nested classes.
>

And...

class Outer
{
     Inner newInner()
     {
         return new Inner();
     }

     class Inner
     {
         private(this) this() //  Error: class 
`EZ_Compiler_tmpfile.Outer.Inner` constructor `this` is not 
accessible
         {

         }
     }
}






More information about the dip.ideas mailing list