https://issues.dlang.org/show_bug.cgi?id=19786
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from RazvanN <[email protected]> --- I think that this code should error. Aliases can be made to types or symbols, however you are trying to alias an expression. For example, simply trying: alias tmp = rhs.x; will result in a compilation error. I don't see how that code can be accepted without redefining the notion of traits. As for the implementation of TypeTraits, I think it was a mistake to allow all traits to be used as types. As you can see, some traits cannot be types. This bug report is an example of how the the type system is bypassed via TypeTraits: the expression returned by __traits is wrapped in a TypeTraits, therefore the compiler thinks it's okay to alias it. --
