www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1982] New: Problems with compile-time null

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

           Summary: Problems with compile-time null
           Product: D
           Version: 2.012
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: samukha voliacable.com


More test cases that should pass:

----
enum a = [1, 2, 3];
static assert (a !is null);

string foo()
{
    return null;
}

static assert (foo() is null);
static assert (!foo().length);

static assert (null is null);
----

Neither of the assert expressions can be evaluated at compile time.


-- 
Apr 10 2008
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1982


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |CTFE
            Summary|Problems with compile-time  |[CTFE] Problems with
                   |null                        |compile-time null



Marked as CTFE issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1982




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/64ea3d8a7223f6c9b1d00e167a5ced4bf20e7992
Fix bug 1982 [CTFE] Problems with compile-time null

Test case only. This was fixed by doing const-folding in CTFE.

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


Test cases for bugs 1982, 7988, 8253, and 8285.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 12 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1982


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


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