Changeset 740 for branches/dmdfe/cast.c
- Timestamp:
- 08/07/07 23:33:56 (1 year ago)
- Files:
-
- branches/dmdfe/cast.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dmdfe/cast.c
r657 r740 88 88 */ 89 89 90 intExpression::implicitConvTo(Type *t)90 MATCH Expression::implicitConvTo(Type *t) 91 91 { 92 92 #if 0 … … 105 105 return e->implicitConvTo(t); 106 106 } 107 intmatch = type->implicitConvTo(t);107 MATCH match = type->implicitConvTo(t); 108 108 if (match) 109 109 return match; … … 130 130 131 131 132 intIntegerExp::implicitConvTo(Type *t)132 MATCH IntegerExp::implicitConvTo(Type *t) 133 133 { 134 134 #if 0 … … 143 143 144 144 if (type->implicitConvTo(t) == MATCHnomatch && t->ty == Tenum) 145 { 145 146 return MATCHnomatch; 147 } 146 148 147 149 switch (ty) … … 303 305 304 306 Lyes: 307 //printf("MATCHconvert\n"); 305 308 return MATCHconvert; 306 309 307 310 Lno: 311 //printf("MATCHnomatch\n"); 308 312 return MATCHnomatch; 309 313 } 310 314 311 intNullExp::implicitConvTo(Type *t)315 MATCH NullExp::implicitConvTo(Type *t) 312 316 { 313 317 #if 0 … … 330 334 } 331 335 332 intStringExp::implicitConvTo(Type *t)336 MATCH StringExp::implicitConvTo(Type *t) 333 337 { MATCH m; 334 338 … … 382 386 } 383 387 384 intArrayLiteralExp::implicitConvTo(Type *t)388 MATCH ArrayLiteralExp::implicitConvTo(Type *t) 385 389 { MATCH result = MATCHexact; 386 390 … … 410 414 } 411 415 412 intAssocArrayLiteralExp::implicitConvTo(Type *t)416 MATCH AssocArrayLiteralExp::implicitConvTo(Type *t) 413 417 { MATCH result = MATCHexact; 414 418 … … 437 441 } 438 442 439 intAddrExp::implicitConvTo(Type *t)443 MATCH AddrExp::implicitConvTo(Type *t) 440 444 { 441 445 #if 0 … … 443 447 toChars(), type->toChars(), t->toChars()); 444 448 #endif 445 intresult;449 MATCH result; 446 450 447 451 result = type->implicitConvTo(t); … … 469 473 } 470 474 471 intSymOffExp::implicitConvTo(Type *t)475 MATCH SymOffExp::implicitConvTo(Type *t) 472 476 { 473 477 #if 0 … … 475 479 toChars(), type->toChars(), t->toChars()); 476 480 #endif 477 intresult;481 MATCH result; 478 482 479 483 result = type->implicitConvTo(t); … … 498 502 } 499 503 500 intDelegateExp::implicitConvTo(Type *t)504 MATCH DelegateExp::implicitConvTo(Type *t) 501 505 { 502 506 #if 0 … … 504 508 toChars(), type->toChars(), t->toChars()); 505 509 #endif 506 intresult;510 MATCH result; 507 511 508 512 result = type->implicitConvTo(t); … … 518 522 { 519 523 if (func && func->overloadExactMatch(t->next)) 520 result = 2;524 result = MATCHexact; 521 525 } 522 526 } … … 524 528 } 525 529 526 intCondExp::implicitConvTo(Type *t)527 { 528 intm1;529 intm2;530 MATCH CondExp::implicitConvTo(Type *t) 531 { 532 MATCH m1; 533 MATCH m2; 530 534 531 535 m1 = e1->implicitConvTo(t);
