dmd icon indicating copy to clipboard operation
dmd copied to clipboard

Redundant "cannot use array to initialize `_error_`" message when initializing invalid array

Open CyberShadow opened this issue 6 months ago • 0 comments

int[unknown] values = [1, 2, 3];

Compiler output:

test.d(1): Error: undefined identifier `unknown`
test.d(1): Error: cannot use array to initialize `_error_`

The second error is redundant, and I don't think users should ever see _error_ anyway.

CyberShadow avatar Apr 25 '25 17:04 CyberShadow