[Issue 3493] Segfault(cast.c) Forward reference with type inference, D1 only.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 9 02:37:37 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3493
--- Comment #2 from Don <clugdbug at yahoo.com.au> 2010-08-09 02:37:30 PDT ---
Here's a more minimal patch. It shouldn't be implicitly casting the
initializer, if it hasn't run semantic on it yet.
expression.c, VarExp::semantic(), line 3955.
if (v)
{
if (v->isConst() && v->type && type->toBasetype()->ty != Tsarray &&
v->init)
{
ExpInitializer *ei = v->init->isExpInitializer();
- if (ei)
+ if (ei && ei->exp->type)
{
+ assert(ei->exp->type);
//ei->exp->implicitCastTo(sc, type)->print();
return ei->exp->implicitCastTo(sc, type);
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list