[Issue 14102] Bad 'is not an lvalue' diagnostic in chained -unary and --preincr expressions.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Feb 16 07:37:56 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14102

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> ---
PR https://github.com/D-Programming-Language/dmd/pull/4415 will improve the
diagnostic to:

test.d(3): Error: -x is not an lvalue
test.d(4): Error: -(x -= 1) is not an lvalue
test.d(5): Error: -(x -= 1 -= 1) is not an lvalue
test.d(6): Error: -(x -= 1 -= 1 -= 1) is not an lvalue

It's not perfect, but far better.

--


More information about the Digitalmars-d-bugs mailing list