dlang-community / D-Scanner

Swiss-army knife for D source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static array expressions not fully supported

Geod24 opened this issue · comments

private immutable bool hasPreviewIn = ((in int[256] a) { return __traits(isRef, a); })(int[256].init);
% generated/dscanner-d5d6920502bf1bfdb29474007a59fd606df0aadc/dsc --styleCheck foo.d
foo.d(1:37)[error]: `(` expected
foo.d(1:53)[error]: invalid variable declaration or function declaration
foo.d(1:54)[error]: no identifier for declarator
foo.d(1:56)[error]: declaration expected instead of `{`
foo.d(1:83)[warn]: Empty declaration
foo.d(1:85)[error]: Declaration expected
foo.d(1:86)[error]: Declaration expected
foo.d(1:87)[error]: Declaration expected
foo.d(1:101)[error]: no identifier for declarator
foo.d(1:102)[warn]: Empty declaration
2023-02-28T12:17:01.257 [warning] first.d:371:visit Could not locate object.d or object.di

Tried several variations of this but nothing worked.

Actually, here's the main problem:

private enum Foo = int[256].init;
foo.d(5:28)[error]: no identifier for declarator