Changeset 206
- Timestamp:
- 10/13/09 16:08:57 (2 years ago)
- Files:
-
- branches/dmd-1.x/src/e2ir.c (modified) (5 diffs)
- trunk/src/e2ir.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmd-1.x/src/e2ir.c
r202 r206 3205 3205 3206 3206 elem *CastExp::toElem(IRState *irs) 3207 { elem *e;3207 { 3208 3208 TY fty; 3209 3209 TY tty; … … 3211 3211 tym_t ttym; 3212 3212 enum OPER eop; 3213 Type *t;3214 Type *tfrom;3215 3213 3216 3214 #if 0 … … 3221 3219 #endif 3222 3220 3223 e = e1->toElem(irs);3224 tfrom = e1->type->toBasetype();3225 t = to->toBasetype(); // skip over typedef's3221 elem *e = e1->toElem(irs); 3222 Type *tfrom = e1->type->toBasetype(); 3223 Type *t = to->toBasetype(); // skip over typedef's 3226 3224 if (t->equals(tfrom)) 3227 3225 goto Lret; … … 3359 3357 } 3360 3358 3361 ftym = e->Ety;3362 ttym = t ->totym();3359 ftym = tybasic(e->Ety); 3360 ttym = tybasic(t->totym()); 3363 3361 if (ftym == ttym) 3364 3362 goto Lret; … … 3864 3862 //dump(0); 3865 3863 //printf("fty = %d, tty = %d\n", fty, tty); 3866 error("e2ir: cannot cast from %s to %s", e1->type->toChars(), t->toChars());3864 error("e2ir: cannot cast %s of type %s to type %s", e1->toChars(), e1->type->toChars(), t->toChars()); 3867 3865 goto Lzero; 3868 3866 trunk/src/e2ir.c
r202 r206 2820 2820 } 2821 2821 #endif 2822 //printf("test2 %d\n", op);2823 2822 //if (op == TOKconstruct) printf("construct\n"); 2824 2823 if (t1b->ty == Tstruct) … … 3533 3532 3534 3533 elem *CastExp::toElem(IRState *irs) 3535 { elem *e;3534 { 3536 3535 TY fty; 3537 3536 TY tty; … … 3539 3538 tym_t ttym; 3540 3539 enum OPER eop; 3541 Type *t;3542 Type *tfrom;3543 3540 3544 3541 #if 0 … … 3549 3546 #endif 3550 3547 3551 e = e1->toElem(irs);3552 tfrom = e1->type->toBasetype();3553 t = to->toBasetype(); // skip over typedef's3548 elem *e = e1->toElem(irs); 3549 Type *tfrom = e1->type->toBasetype(); 3550 Type *t = to->toBasetype(); // skip over typedef's 3554 3551 if (t->equals(tfrom)) 3555 3552 goto Lret; … … 3695 3692 } 3696 3693 3697 ftym = e->Ety;3698 ttym = t ->totym();3694 ftym = tybasic(e->Ety); 3695 ttym = tybasic(t->totym()); 3699 3696 if (ftym == ttym) 3700 3697 goto Lret; … … 4199 4196 goto Lpaint; 4200 4197 //dump(0); 4201 //printf("fty = %d, tty = %d \n", fty, tty);4202 error("e2ir: cannot cast from %s to %s", e1->type->toChars(), t->toChars());4198 //printf("fty = %d, tty = %d, %d\n", fty, tty, t->ty); 4199 error("e2ir: cannot cast %s of type %s to type %s", e1->toChars(), e1->type->toChars(), t->toChars()); 4203 4200 goto Lzero; 4204 4201
