https://issues.dlang.org/show_bug.cgi?id=21762
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |rg Hardware|x86_64 |All OS|Linux |All Severity|normal |regression --- Comment #1 from [email protected] --- Reduced example: ---------------------------------------------- import core.stdc.stdio : puts; struct A(T) { T* address; ~this() { destroy(*address); } } void main() { static struct B { A!B next()(); ~this() { puts("B destroyed"); } } static struct C { A!C next(); ~this() { puts("C destroyed"); } } B b; destroy(b); C c; destroy(c); } ---------------------------------------------- Introduced by https://github.com/dlang/druntime/pull/1312. But it's probably a DMD issue because the PR introduced __traits(hasMember, S, "__xdtor") which is true for B but false for C --
