[Issue 21590] assignment inside assert accepted if -checkaction=context is given
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jan 30 12:59:51 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21590
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #12165 "Fix 21590 - assignment inside assert accepted
for -checkaction=context" was merged into stable:
- f9dc70cc7d57e24a05379496b17e1d150c363eb5 by MoonlightSentinel:
Fix 21590 - assignment inside assert accepted for -checkaction=context
The rewrite introduced a temporary which hid the assignment inside of
`assert(...)` and hence prevented the error.
The fix is to omit the additional temporary for `AssignExp` and use
the assigned variable directly. The temporary is unecessary anyways
and the following semantic analysis will raise an appropriate error.
https://github.com/dlang/dmd/pull/12165
--
More information about the Digitalmars-d-bugs
mailing list