Why does the following code fail the assertion?

class A {
  void foo()
    out  { assert(stored is this); }
    body { }
}

A stored;

class B : A {
  void foo() { stored = this; }
}

void main () {
  B x = new B();
  x.foo();
}

Reply via email to