You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think both the following should compile:
int[1] foo1(int[1] a) {
a[] += 10;
return a; // OK.
}
int[1] foo2(int[1] a) {
return a[] += 10; // Error.
}
void main() {}
DMD 2.066alpha gives:
test.d(6,16): Error: cannot implicitly convert expression (_arrayExpSliceAddass_i(a[], 10)) of type int[] to int[1]
The text was updated successfully, but these errors were encountered:
(In reply to Kenji Hara from comment #1)
> *** Issue 12770 has been marked as a duplicate of this issue. ***
I think the good way to solve this bug and others (and to improve D language usability in other ways) is with the enhancement of Issue 13228
(In reply to bearophile_hugs from comment #2)
> > I think the good way to solve this bug and others (and to improve D language> usability in other ways) is with the enhancement of Issue 13228
I agree.
bearophile_hugs reported this on 2014-04-25T14:10:21Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=12648
CC List
Description
The text was updated successfully, but these errors were encountered: