Thread overview
[BUG] assert() in dtor causes access violation
Apr 25, 2004
Sark7
Apr 25, 2004
Walter
Apr 26, 2004
Sark7
April 25, 2004
[code]
class A {
  ~this() { assert(false); }
}
void main() {
  A a = new A();
}
[/code]

In static dtor assert() causes AV too.

April 25, 2004
Are you sure you're seeing an access violation, or are you seeing an uncaught exception?

"Sark7" <sark7@mail333.com> wrote in message news:opr60vkie1ut8jae@news.digitalmars.com...
> [code]
> class A {
>    ~this() { assert(false); }
> }
> void main() {
>    A a = new A();
> }
> [/code]
>
> In static dtor assert() causes AV too.
>


April 26, 2004
On Sun, 25 Apr 2004 11:38:50 -0700, Walter <walter@digitalmars.com> wrote:
> Are you sure you're seeing an access violation, or are you seeing an
> uncaught exception?
>

Hmm... sorry, it is a uncaught exception. I have been mangled with different behaivour of
assert() in ctor & dtor. Why in ctor exception is handled by default, but in dtor it is not?
Spec says nothing about that.

Thanks.