Thread overview
[Issue 12985] Better error message for not supported array operation
Sep 21, 2014
Kenji Hara
Oct 01, 2014
Kenji Hara
September 21, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> ---
>From https://issues.dlang.org/show_bug.cgi?id=12179#c7

> The error message for the original code is:
> 
> test.d(4,6): Error: array operation a[] * a[] without assignment not
> implemented
> 
> But perhaps a better error message is related to this:
> 
> test.d(4,6): Error: array operation a[] * a[] without explicit destination
> memory not allowed
> 
> Because I think not allocating memory from array ops is a design decision, and it will not be implemented.

I think "without destination memory not allowed" would be better.

--
September 21, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

--- Comment #2 from bearophile_hugs@eml.cc ---
(In reply to Kenji Hara from comment #1)

> I think "without destination memory not allowed" would be better.

I am not a native English speaker, we need one to find the best phrasing :-)

--
September 21, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

--- Comment #3 from bearophile_hugs@eml.cc ---
Currently this case gets refused, but here the result of the array operation has a memory zone to go (the stack, inside the variable f):


struct Foo { int[3] a; }
void main() {
    int[3] b;
    auto f = Foo(b[] / 2);
}

--
October 01, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
           Hardware|x86                         |All
                 OS|Windows                     |All

--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> ---
https://github.com/D-Programming-Language/dmd/pull/4039

--
October 05, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2ae8fe46c7f7a8a8c464a1d40d306f9f2926ebca fix Issue 12985 - Better error message for not supported array operation

https://github.com/D-Programming-Language/dmd/commit/f8265aed59ee1256b52d7d1e360336b2c380b989 Merge pull request #4039 from 9rnsr/fix12985

Issue 12985 - Better error message for not supported array operation

--
October 05, 2014
https://issues.dlang.org/show_bug.cgi?id=12985

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
February 19, 2015
https://issues.dlang.org/show_bug.cgi?id=12985

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to 2.067 at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/2ae8fe46c7f7a8a8c464a1d40d306f9f2926ebca fix Issue 12985 - Better error message for not supported array operation

https://github.com/D-Programming-Language/dmd/commit/f8265aed59ee1256b52d7d1e360336b2c380b989 Merge pull request #4039 from 9rnsr/fix12985

--