[Chapel Merge] Avoid compiler crash when parsing standalone `[]`

Branch: refs/heads/master
Revision: 6315f6c
Author: vasslitvinov
Log Message:

Merge pull request #17780 from vasslitvinov/proper-error-sq-brackets

Avoid compiler crash when parsing standalone []

With this change, issue a proper parser error upon type T = [];
whereas formerly it crashed the compiler.

r: @lydia-duncan

Modified Files:
A test/arrays/compilerErrors/array-generic-type.chpl

A test/arrays/compilerErrors/array-generic-type.good
M compiler/AST/build.cpp

Compare: https://github.com/chapel-lang/chapel/compare/66fd7bf48266...6315f6c9d987