https://issues.dlang.org/show_bug.cgi?id=24717
Nick Treleaven <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |enhancement --- Comment #4 from Nick Treleaven <[email protected]> --- > alias y = s.tupleof[0]; // this is a compile error?! The error is: Error: alias `y` cannot alias an expression `AliasSeq!(s.x)[0]` That is because an alias declaration cannot target a value. For: struct S { int x; alias expand=Seq!x; } Turns out .tupleof is actually equivalent to the `expand` alias, see: https://forum.dlang.org/post/[email protected] alias z = AliasSeq!(s.tupleof); z[0].writeln(); // Error: accessing non-static variable `x` requires an instance of `S` So the above error is consistent with the design of symbol aliases. Changing this issue to an enhancement. --
