Nested struct member has no access to the enclosing class data

RivenTheMage riven-mage at id.ru
Mon Aug 6 14:32:15 PDT 2012


Is it bug or feature? :)

------------
class Foo
{
      int i;

      struct Bar
      {
          int j;

          int foobar()
          {
              return i + j;
          }
      }
}
------------

main.d(ХХ): Error: this for i needs to be type Foo not type Bar


More information about the Digitalmars-d-learn mailing list