On Monday, 17 June 2024 at 19:45:18 UTC, realhet wrote:
Hello,
I'm having a weird case of access violation.
Often times, you are focused on something that isn't the problem,
but *triggers* the problem. Not saying it's not a compiler error,
it could be. But chances are pretty low.
If you cannot get this to happen unless you use your custom
writeln thing, I'd focus on trying to figure out if that custom
writeln is doing something incorrect.
All the code you posted here looks fine to me. It compiles and
runs fine on run.dlang.io (even with the `version(none)` changed
to `version(all)`, or using `scoped!B`).
-Steve