void main() { alias Type = int[string]; // cannot use '==' with types static assert(is(int[string]) == Type); // Error: found '[' when expecting '.' following int static assert(is(int[string]) == int[string]); } The first error message is informative, but the second one is a syntax error. The compiler should emit the first message for both cases.
@ntrel created dlang/dmd pull request #14672 "Fix Issue 9848 - Better diagnostic when basic type was not expected" fixing this issue: - Fix Issue 9848 - Better diagnostic when type was not expected https://github.com/dlang/dmd/pull/14672
dlang/dmd pull request #14672 "Fix Issue 9848 - Better diagnostic when basic type was not expected" was merged into master: - 6068e8188c3fb9b984e30d5536fac779dce07d3b by Nick Treleaven: Fix Issue 9848 - Better diagnostic when type was not expected https://github.com/dlang/dmd/pull/14672