[Issue 21765] Assignment-as-condition error with checkaction=context
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 25 02:57:59 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21765
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pull
--- Comment #1 from Dlang Bot <dlang-bot at dlang.rocks> ---
@MoonlightSentinel created dlang/dmd pull request #12307 "Fix 21765 -
Assignment-as-condition error with checkaction=context" fixing this issue:
- 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