Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array type init syntax #18719

Open
dlangBugzillaToGithub opened this issue Nov 24, 2013 · 0 comments
Open

Array type init syntax #18719

dlangBugzillaToGithub opened this issue Nov 24, 2013 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

bearophile_hugs reported this on 2013-11-24T06:07:03Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=11593

Description

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant