Bug 21798 – checkaction=context creates temporary of type void

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-04T22:04:08Z
Last change time
2021-04-09T10:49:00Z
Keywords
pull
Assigned to
No Owner
Creator
moonlightsentinel

Comments

Comment #0 by moonlightsentinel — 2021-04-04T22:04:08Z
Example: ================================================= void issue() { assert(main()); } ================================================= dmd issue.d: > expression `issue()` of type `void` does not have a boolean value dmd -checkaction=context issue.d > variable __stdin.issue.__assertOp2 variables cannot be of type void > expression issue() is void and has no value
Comment #1 by dlang-bot — 2021-04-04T22:07:07Z
@MoonlightSentinel created dlang/dmd pull request #12373 "Fix 21798 - checkaction=context creates temporary of type void" fixing this issue: - Fix 21798 - checkaction=context creates temporary of type void Skip temporaries for `void` expressions and defer error messages to further semantic analysis. https://github.com/dlang/dmd/pull/12373
Comment #2 by dlang-bot — 2021-04-04T23:39:30Z
dlang/dmd pull request #12373 "Fix 21798 - checkaction=context creates temporary of type void" was merged into stable: - 78a0efe8b57e671ee3951c23709f8fa7033a924c by MoonlightSentinel: Fix 21798 - checkaction=context creates temporary of type void Skip temporaries for `void` expressions and defer error messages to further semantic analysis. https://github.com/dlang/dmd/pull/12373
Comment #3 by dlang-bot — 2021-04-09T10:49:00Z
dlang/dmd pull request #12408 "Merge stable into master" was merged into master: - f5f75b6ff03d757f70564c3df71f19995166bf96 by MoonlightSentinel: Fix 21798 - checkaction=context creates temporary of type void Skip temporaries for `void` expressions and defer error messages to further semantic analysis. https://github.com/dlang/dmd/pull/12408