struct S { mixin foo!() bar; } template foo() { int n; alias n this; } unittest { int n = S.init; } The alias this is inside a named member of S, and it is counterintuitive that it affects S.
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19407 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB