http://d.puremagic.com/issues/show_bug.cgi?id=6358
Summary: ICE when using an member template (not a template instance) in an expression. Product: D Version: D2 Platform: Other OS/Version: Mac OS X Status: NEW Keywords: ice-on-invalid-code Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-20 14:15:47 PDT --- Test case: ------------------------------------------- struct S6358 { double peek(T)(int x) { return 0; } } void bug6358a() { S6358 s; cast(void) (s.peek is &s); // <-- (a) } void bug6358b() { S6358 s; cast(void) (s.peek + &s); // <-- (b) } void bug6358c() { S6358 s; s.peek += 1; // <-- (c) } ------------------------------------------- The ICE in (a) happens at: Expression *BinExp::typeCombine(Scope *sc) { Type *t1 = e1->type->toBasetype(); Type *t2 = e2->type->toBasetype(); // <-- this line, e2->type == NULL if (op == TOKmin || op == TOKadd) { The ICE in (b) happens at: AggregateDeclaration *isAggregate(Type *t) { t = t->toBasetype(); // <-- this line, t == NULL if (t->ty == Tclass) { The ICE in (c) happens at: int CallExp::isLvalue() { // if (type->toBasetype()->ty == Tstruct) // return 1; Type *tb = e1->type->toBasetype(); // <-- the line, e1->type == NULL -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------