On Tuesday, 14 June 2022 at 13:39:12 UTC, Andrey Zherikov wrote:
I have [pretty simple code in my
library](https://github.com/andrey-
[Line (2)
produces](https://github.com/andrey-zherikov/argparse/runs/6880350900?check_suite_focus=true#step:5:12) `undefined reference to '_D3std7sumtype__T7SumTypeTS8argparse4help2AATSQtQm2BBZQBl6__dtorMFNaNbNiNfZv'` (it demangles to `pure nothrow @nogc @safe void std.sumtype.SumType!(argparse.help.AA, argparse.help.BB).SumType.__dtor()`)
If I comment line (2) then everything is good (no link errors).
Note that there is the same code at (1) which doesn't produce
any error. Any idea what's going on?
That can be a template instance that's emitted somewhere else,
i.e the thing is there but the mangle is different. maybe try to
find if the dtor is there with `mn -S` on each object.
Another thing to try in these situations is to see if that works
with `-allinst`.