https://run.dlang.io/is/Nio6z1 Reduced crashing case: import std.variant; struct While(T) { T[] body; } alias Stmt = Algebraic!(While!(This)); Doesn't occur with inline This[] or when referenced as T* or T*[] instead of T[].
@Basile-z created dlang/dmd pull request #10173 "fix issue 20044 - Compiler crash when using an opaque struct as templ…" fixing this issue: - fix issue 20044 - Compiler crash when using an opaque struct as template parameter https://github.com/dlang/dmd/pull/10173
dlang/dmd pull request #10173 "fix issue 20044 - Compiler crash when using an opaque struct as template parameter" was merged into stable: - 8ad3f43068bbe7bfe9a05c8e6838f102ff027f55 by Basile Burg: fix issue 20044 - Compiler crash when using an opaque struct as template parameter https://github.com/dlang/dmd/pull/10173