From cd99e773f0ee50206fba847c17acb73a5ba081d1 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 1 Oct 2008 19:15:17 +0200 Subject: [PATCH] Make typedef'ed complex types work. --- gen/complex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/complex.cpp b/gen/complex.cpp index 104534d6..3c4c9f5d 100644 --- a/gen/complex.cpp +++ b/gen/complex.cpp @@ -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;