www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21798] New: checkaction=context creates temporary of type void

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

          Issue ID: 21798
           Summary: checkaction=context creates temporary of type void
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: moonlightsentinel disroot.org

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
--
Apr 04