Use _d_assocarrayliteralTX to initialize associative arrays. Replace depricated _d_arrayappendcT() by _d_arrayappendcTX(). Make sure that a l-value of a binassign expressions is only evaluated once (reapllied 1784 but only for D2)

This commit is contained in:
Alexey Prokhin
2011-02-20 19:00:45 +03:00
parent 600a3100c0
commit 6d89bfa961
7 changed files with 127 additions and 38 deletions

View File

@@ -591,12 +591,8 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
// repaint the type if necessary
if (resulttype)
{
Type* rbase = resulttype->toBasetype();
Type* nextbase = tf->nextOf()->toBasetype();
#if DMDV2
rbase = rbase->mutableOf();
nextbase = nextbase->mutableOf();
#endif
Type* rbase = stripModifiers(resulttype->toBasetype());
Type* nextbase = stripModifiers(tf->nextOf()->toBasetype());
if (!rbase->equals(nextbase))
{
Logger::println("repainting return value from '%s' to '%s'", tf->nextOf()->toChars(), rbase->toChars());