Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.

Fixed some casts to bool that were using truncation.
This commit is contained in:
Christian Kamm
2008-11-22 18:35:52 +01:00
parent 660ca009b9
commit 6efc9a3324
7 changed files with 50 additions and 80 deletions

View File

@@ -454,6 +454,9 @@ DValue* DtoCastComplex(Loc& loc, DValue* val, Type* _to)
DImValue* re = new DImValue(to, repart);
return DtoCastFloat(loc, re, to);
}
else if (to->ty == Tbool) {
return new DImValue(_to, DtoComplexEquals(loc, TOKnotequal, val, DtoNullValue(vty)));
}
else
assert(0);
}