http://d.puremagic.com/issues/show_bug.cgi?id=10424
--- Comment #3 from Nils <[email protected]> 2013-06-21 08:58:48 PDT --- (In reply to comment #2) > The line is correct D code. g() returns an rvalue int[] array, but the > assignment is element-wise, and elements of array are always lvalue. > Then, there's no meaningless rvalue modification. You're right. I over-simplified the test-case. The actual problem involved fixed-sized arrays: struct P { int[2] _data; int[2] data() {return _data;} } void main() { P p; p.data[] = [42, 42]; /* would be neat if this threw a "not an lvalue" error */ p.data[0] = 42; /* ditto */ } So the issue is that the elements of rvalue fixed-sized arrays are treated as lvalues. Should I file a new bug for that? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
