Changeset 770:50eae902f77e
- Timestamp:
- 11/14/08 10:26:12
(2 months ago)
- Author:
- Christian Kamm <kamm incasoftware de>
- branch:
- default
- Message:
Cast result of ...AssignExp? to type the frontend expects if necessary. Fixes #116.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r763 |
r770 |
|
| 538 | 538 | DValue* AddAssignExp::toElem(IRState* p) |
|---|
| 539 | 539 | { |
|---|
| 540 | | Logger::print("AddAssignExp::toElem: %s\n", toChars()); |
|---|
| | 540 | Logger::print("AddAssignExp::toElem: %s | %s\n", toChars(), type->toChars()); |
|---|
| 541 | 541 | LOG_SCOPE; |
|---|
| 542 | 542 | |
|---|
| … | … | |
| 558 | 558 | } |
|---|
| 559 | 559 | DtoAssign(loc, l, res); |
|---|
| | 560 | |
|---|
| | 561 | if (res->getType() != type) |
|---|
| | 562 | res = DtoCast(loc, res, type); |
|---|
| 560 | 563 | |
|---|
| 561 | 564 | return res; |
|---|
| … | … | |
| 632 | 635 | DtoAssign(loc, l, res); |
|---|
| 633 | 636 | |
|---|
| | 637 | if (res->getType() != type) |
|---|
| | 638 | res = DtoCast(loc, res, type); |
|---|
| | 639 | |
|---|
| 634 | 640 | return res; |
|---|
| 635 | 641 | } |
|---|
| … | … | |
| 671 | 677 | DtoAssign(loc, l, res); |
|---|
| 672 | 678 | |
|---|
| | 679 | if (res->getType() != type) |
|---|
| | 680 | res = DtoCast(loc, res, type); |
|---|
| | 681 | |
|---|
| 673 | 682 | return res; |
|---|
| 674 | 683 | } |
|---|
| … | … | |
| 710 | 719 | DtoAssign(loc, l, res); |
|---|
| 711 | 720 | |
|---|
| | 721 | if (res->getType() != type) |
|---|
| | 722 | res = DtoCast(loc, res, type); |
|---|
| | 723 | |
|---|
| 712 | 724 | return res; |
|---|
| 713 | 725 | } |
|---|
| … | … | |
| 738 | 750 | DValue* res = DtoBinRem(l->getType(), l, r); |
|---|
| 739 | 751 | DtoAssign(loc, l, res); |
|---|
| | 752 | |
|---|
| | 753 | if (res->getType() != type) |
|---|
| | 754 | res = DtoCast(loc, res, type); |
|---|
| 740 | 755 | |
|---|
| 741 | 756 | return res; |
|---|