www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - DMD 0.127 Internal error: e2ir.c 118

Compiling this code returns Internal error: e2ir.c 118.

    class Owner {

      this() {
        nested_ = new Nested(this);
      }

      class Nested {

        this(Owner owner) {
        }

      }

      private Nested nested_;

    }

    class OwnerDerived : Owner {
    }

I suggest the error should be something like "constructor not allowed on 
class Nested, try 'static class' instead"? Another problem is that if you 
leave out the OwnerDerived declaration, it compiles ok.
Jun 25 2005