Thread overview
[Issue 14343] Postfix increment doesn't work on structs with immutable member
Mar 26, 2015
Nicolas Sicard
Mar 26, 2015
Nicolas Sicard
Mar 27, 2015
Kenji Hara
May 16, 2015
Vladimir Panteleev
March 26, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

Nicolas Sicard <dransic@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X                    |All
           Severity|enhancement                 |normal

--
March 26, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

--- Comment #1 from Nicolas Sicard <dransic@gmail.com> ---
The problem doesn't show with the old operator overloading methods:

struct S
{
    int i;
    immutable(Object) o;

    void opAddAssign(int j) { i += j; }
    S opPostInc() { ++i; return this; }
    void opAssign(S other) {}
}

unittest
{
    S s;
    ++s;
    assert(s.i == 1);
    s++;
    assert(s.i == 2);
}

--
March 27, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
           Hardware|x86                         |All

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

--
March 31, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

--- Comment #3 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/30219cc6a1a647eb39e033342fa29a28a4da30fe
fix Issue 14343 - Postfix increment doesn't work on structs with immutable
member

https://github.com/D-Programming-Language/dmd/commit/9ea13cfb5cd904b0586b0209e70bec484e16fef6 Merge pull request #4522 from 9rnsr/fix14343

Issue 14343 - Postfix increment doesn't work on structs with immutable member

--
May 16, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |svv1999@hotmail.com

--- Comment #4 from Vladimir Panteleev <thecybershadow@gmail.com> ---
*** Issue 14589 has been marked as a duplicate of this issue. ***

--
June 17, 2015
https://issues.dlang.org/show_bug.cgi?id=14343

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

https://github.com/D-Programming-Language/dmd/commit/30219cc6a1a647eb39e033342fa29a28a4da30fe
fix Issue 14343 - Postfix increment doesn't work on structs with immutable
member

https://github.com/D-Programming-Language/dmd/commit/9ea13cfb5cd904b0586b0209e70bec484e16fef6 Merge pull request #4522 from 9rnsr/fix14343

--