Make typedef'ed complex types work.

This commit is contained in:
Christian Kamm
2008-10-01 19:15:17 +02:00
parent 77b5e841dd
commit cd99e773f0

View File

@@ -92,7 +92,7 @@ DValue* DtoComplex(Loc& loc, Type* to, DValue* val)
Type* baserety;
Type* baseimty;
TY ty = to->ty;
TY ty = to->toBasetype()->ty;
if (ty == Tcomplex32) {
baserety = Type::tfloat32;
baseimty = Type::timaginary32;
@@ -136,7 +136,7 @@ void DtoGetComplexParts(Loc& loc, Type* to, DValue* val, LLValue*& re, LLValue*&
Type* baserety;
Type* baseimty;
TY ty = to->ty;
TY ty = to->toBasetype()->ty;
if (ty == Tcomplex32) {
baserety = Type::tfloat32;
baseimty = Type::timaginary32;