www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1524] New: ICE on using "is" with strings in CTFE

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

           Summary: ICE on using "is" with strings in CTFE
           Product: D
           Version: 1.021
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code, rejects-valid
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thecybershadow gmail.com


-----
bool isNull(char[] str)
{
        return str is null;
}

const bool test = isNull("hello!");
-----
Output:
 Assertion failure: '0' on line 838 in file 'constfold.c'
 
 abnormal program termination

Replacing "is" with "==" fixes it. --
Sep 22 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1524





------- Comment #1 from clugdbug yahoo.com.au  2009-05-05 02:09 -------
Created an attachment (id=351)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=351&action=view)
Patch against DMD2.029

Another trivial one. The case where only one parameter was null had been
forgotten.


-- 
May 05 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1524


Walter Bright <bugzilla digitalmars.com> changed:

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




--- Comment #2 from Walter Bright <bugzilla digitalmars.com>  2009-07-09
02:46:02 PDT ---
Fixed dmd 1.046 and 2.031

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