D2 code: enum size_t N = 1; int[bar.length] foo; int[N] bar; void main() {} DMD 2.055 gives: Error: cannot create associative array int[N] This is a very nice bug. There are three problems here: refusing valid code, thinking bar is an associative array instead of a fixed-sized one, and giving no line number.
The problem here is that TypeAArray::getImpl is being called on bar before semantic has, therefore there is no scope or location. Of the three problems, the lack of scope causes the failure to lookup N (and therefore the failure to recognize bar as a static array), and also the lack of a file/line number.
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b95c7bd8537ac54ab871615dfddec851444a9a0a add test case for Issue 6655
Works in 2.059.