www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2308] New: CTFE crash on foreach over nonexistent variable

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2308

           Summary: CTFE crash on foreach over nonexistent variable
           Product: D
           Version: 1.034
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: matti.niemenmaa+dbugzilla iki.fi


bool foo() {
        foreach (x; xs) {}
        return true;
}

static assert (foo());

Compiling the above gives the following, after which DMD crashes:

asdff.d(2): Error: undefined identifier xs
asdff.d(2): Error: cannot infer type for x


-- 
Aug 23 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2308


matti.niemenmaa+dbugzilla iki.fi changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #1 from matti.niemenmaa+dbugzilla iki.fi  2008-09-03 01:19
-------
Fixed in DMD 1.035.


-- 
Sep 02 2008
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2308





------- Comment #2 from bugzilla digitalmars.com  2008-09-03 01:37 -------
Fixed dmd 1.035 and 2.019


-- 
Sep 02 2008