D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11593 - Array type init syntax
Summary: Array type init syntax
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2013-11-24 06:07 UTC by bearophile_hugs
Modified: 2024-12-13 18:14 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2013-11-24 06:07:03 UTC
I think all the following forms should be accepted:

void main() {
    auto i1  = int.init;        // OK
    auto s1  = string.init;     // OK
    auto a1  = int[].init;      // Error
    auto a2  = (int[]).init;    // OK
    auto aa1 = int[int].init;   // Error
    auto aa2 = (int[int]).init; // OK
}


See also Issue 6408
Comment 1 dlangBugzillaToGithub 2024-12-13 18:14:17 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18719

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB