Summary: Strongly-pure nothrow functions with ignored return
                    value are entirely stripped even if it contains a
                    failing 'assert'.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2011-06-24 01:05:51 PDT ---
Test case:

int x() pure nothrow {
    assert(false, "1");

void main() {

This should throw an AssertError, but instead the generated program does
nothing. The AssertError will be thrown if the return value of 'x' is assigned
to some variable though. 

This bug (?) causes 'runnable/test41.d' to fail since commit 4c9661f as nothrow
inference is also implemented, making 'imports.test41a.func' a strongly-pure
nothrow function, and the 'assert' inside fails to run.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to