Thread overview
but report
Jul 04, 2002
Dario
Jul 04, 2002
Walter
Jul 04, 2002
Dario
Jul 05, 2002
Walter
July 04, 2002
____________________
class Derived: Base
{}

class Base
{}
_____________________

Compiler output:
Asserion failure: 'structsize >= 8' on line 412 in file 'glue.c'

We can't write a derived class before its super one. Is this intentional? If it is, it seems very strange, doesn't it? Has this been reported already?


July 04, 2002
"Dario" <supdar@yahoo.com> wrote in message news:ag1vgt$1n7l$1@digitaldaemon.com...
> ____________________
> class Derived: Base
> {}
>
> class Base
> {}
> _____________________
>
> Compiler output:
> Asserion failure: 'structsize >= 8' on line 412 in file 'glue.c'
>
> We can't write a derived class before its super one. Is this intentional?
If
> it is, it seems very strange, doesn't it? Has this been reported already?

It is intentional, but you should have gotten a diagnostic rather than the assert notice.


July 04, 2002
> > class Derived: Base
> > {}
> >
> > class Base
> > {}
> > _____________________
> >
> > Compiler output:
> > Asserion failure: 'structsize >= 8' on line 412 in file 'glue.c'
> >
> > We can't write a derived class before its super one. Is this
intentional?
> > If it is, it seems very strange, doesn't it? Has this been reported
already?

> It is intentional, but you should have gotten a diagnostic rather than the assert notice.

You wrote that the D source is interpreted as a whole. This looks like an
exception. (And you hate exception, don't you?)
I know that there is no need for this to change: nobody is writing a base
class after a derived one. But IMHO this shouldn't be forbidden.


July 05, 2002
"Dario" <supdar@yahoo.com> wrote in message news:ag2d5m$2594$1@digitaldaemon.com...
> > It is intentional, but you should have gotten a diagnostic rather than
the
> > assert notice.
> You wrote that the D source is interpreted as a whole. This looks like an
> exception. (And you hate exception, don't you?)
> I know that there is no need for this to change: nobody is writing a base
> class after a derived one. But IMHO this shouldn't be forbidden.

Yeah, I hate exceptions. But there did turn out to be some chicken-and-egg problems.