[Issue 2843] ICE with is-expression with invalid dot-expression in is-expression involving typeid expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue May 5 08:42:59 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2843
clugdbug at yahoo.com.au changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
------- Comment #1 from clugdbug at yahoo.com.au 2009-05-05 10:43 -------
Reduced test case:
bool b = 1 is typeid(int);
This has the same root cause as 1524 (only cases where both are the same type
were considered), but it's the case where one expression is a typeid, and the
other is const.
In constfold.c, line 861:
OLD:
}else
assert(0);
NEW:
}else if (e1->isConst() && e2->isConst()) {
// Comparing a SymExp with a literal, eg typeid(int) is 7.1;
cmp=0; // An error has already occured. Prevent an ICE.
}else
assert(0);
--
More information about the Digitalmars-d-bugs
mailing list