[Issue 9291] New: [ICE] throwing undefined identifier with nothrow crashes dmd

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jan 10 10:08:13 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9291

           Summary: [ICE] throwing undefined identifier with nothrow
                    crashes dmd
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: monarchdodra at gmail.com


--- Comment #0 from monarchdodra at gmail.com 2013-01-10 10:08:06 PST ---
//----
void foo() nothrow
{
    throw new Hello();
}
//----

Produces:
//----
main.d(3): Error: undefined identifier Hello
Assertion failure: 'cd' on line 5048 in file 'statement.c'

abnormal program termination
//----

This is a regression introduced in 2.061, which was probably caused by:
http://d.puremagic.com/issues/show_bug.cgi?id=8675

https://github.com/D-Programming-Language/dmd/commit/d77b7c2bf456e99495d8a6644a6304995d1a3b20

In 2.060, the error produced is:
//----
main.d(3): Error: undefined identifier Hello
main.d(3): Error: _error_ is thrown but not caught
main.d(1): Error: function main.foo 'foo' is nothrow yet may throw
//----

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list