[Issue 21765] Assignment-as-condition error with checkaction=context

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 25 05:50:49 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

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

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12307 "Fix 21765 - Assignment-as-condition error with
checkaction=context" was merged into master:

- 9cb19e23cf092ced72c1a56f479027abdb6748d5 by MoonlightSentinel:
  Fix 21765 - Assignment-as-condition error with checkaction=context

  Don't eagerly check `toBoolean` if `op` is nested in another expression.
  This still catches `assert((a = 1))` but prevents invalid errors for
  assignments in `assert((a = 1) == 1)`.

https://github.com/dlang/dmd/pull/12307

--


More information about the Digitalmars-d-bugs mailing list