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 7444 - Require [] for array copies too #702
Conversation
This looks good, and I like how you handled the covariance a lot. Kudos to @9rnsr! Now I know you'll hate this, but we can't pull this in without adequate documentation. Could you please find the time to write a draft? |
Fails to compile druntime |
I've posted a pull request which fixes druntime code based on this enhancement. |
Minimal reverting of Issue 1824 - Object not const correct
As I wrote on the bugzilla entry, I'm not sure this is worth code breakage. |
Maybe do it as a warning? |
OK. I changed deprecation errors to warning. |
Comemnt to re-run auto tester. |
Issue 7444 - Require [] for array copies too
Can we improve the error message here? Saying one syntax is better than the other without a reason in the error message has no meaning. Also the message itself is unpleasant: void main()
{
int[] a;
int[] b;
a[] = b;
}
What's with the parenthesized b? Another one: void main()
{
char[3] dst;
char[3] src = [1, 2, 3];
char* ptr = &dst[0];
ptr[0 .. 3] = src;
}
This is an extremely ugly diagnostic, it needs to improve. |
http://d.puremagic.com/issues/show_bug.cgi?id=7444
Deprecate ambiguity between slice assignment and element-wise one.
See
test/runnable/assignable.d
Requires:
dlang/druntime#314(merged)Requires: dlang/phobos#960