[Issue 2940] null is null cannot be evaluated at compile time

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 5 01:01:33 PDT 2009


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





------- Comment #1 from clugdbug at yahoo.com.au  2009-05-05 03:01 -------
PATCH in optimize.c, line 779, in IdentityExp::optimize(int result)
Just allow TOKnull as one of the parameters.

OLD:
    if (this->e1->isConst() && this->e2->isConst())
    {
        e = Identity(op, type, this->e1, this->e2);
    }
NEW:
    if ((this->e1->isConst() || this->e1->op == TOKnull) &&
(this->e2->isConst()|| this->e2->op == TOKnull))
    {
        e = Identity(op, type, this->e1, this->e2);
    }


-- 



More information about the Digitalmars-d-bugs mailing list