Inner classes question

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Sun Sep 10 04:47:38 PDT 2006


Steve Horne wrote:
> On Sun, 10 Sep 2006 13:11:47 +0200, Ivan Senji
> <ivan.senji_REMOVE_ at _THIS__gmail.com> wrote:
> 
>> I2 doesn't have a base class, so that wouldn't work.
> 
> Yeah, I'm confusing myself.
> 
> The problem, I suspect, is putting 'new' in an initialiser. If it was
> in a (dynamic) method, 

Sorry (a bug in my example, but it doesn't change anything)

class O
{
   class I1
   {
   }
   class I2
   {
     this()
     {
       I1 a = new I1; //line 10 -> same error
     }
   }
}

> the standard route to the outer-class instance
> would apply so it should just work, unless I'm missing something.

That is what I would expect too but it doesn't happen (so we are both 
missing something)





More information about the Digitalmars-d-learn mailing list