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

Issue 12936 - Some more @nogc cases for immediately iterated array literal #5795

Merged
merged 1 commit into from
Aug 10, 2016

Conversation

9rnsr
Copy link
Contributor

@9rnsr 9rnsr commented May 19, 2016

Support case#2 in bugzilla.

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
12936 Some more @nogc cases for immediately iterated array literal

// converting array literal elements to telem might make it @nogc.
aggr = aggr.implicitCastTo(sc, telem.sarrayOf(edim));
if (aggr.op == TOKerror)
goto Lerror2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this add errors that didn't exist before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Essentially, no. The target of element type telem is either:

  • explicitly specified by user, If it doesn't match aggr elements, it should have been error already.
  • inferred from aggr elements type. If implicitCastTo call will cause a new error, it's a bug in dcast.d.

@andralex andralex merged commit 46c3512 into dlang:master Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants