[Issue 23490] DMD creating corrupted vtable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 1 17:07:32 UTC 2022


https://issues.dlang.org/show_bug.cgi?id=23490

--- Comment #4 from Iain Buclaw <ibuclaw at gdcproject.org> ---
With the ICE, it's easier to get a further reduction/consolidation of sources.

frop.d
---
import pop;
class Mu: Pop { }
class Frop : Pop {
  // final       // does not fail if declared final
  void frolick() {}
}
---

pop.d
---
import frop;
import zoo: Zoo;
class Pop {
  void poop(Frop ) { }
  void copy(Zoo ) { }
}
---

zoo.d
---
import pop;
import frop;
class Foo(): Pop {
  override void poop(Frop frop) {
    frop.frolick;
  }
}
class Baz {
  Foo!() foo;
  Frop frop;
}
class Bar {
  static instance() { return new Baz; }
  auto ss = __traits(getAttributes, instance.frop);
}
class Zoo { }
---


ICE triggered with: dmd -o- pop.d

--


More information about the Digitalmars-d-bugs mailing list