Made casts between vector types work.

This commit is contained in:
Jernej Krempuš
2012-10-05 19:38:43 +02:00
parent 4e49814afb
commit 39300283c0

View File

@@ -809,6 +809,10 @@ DValue* DtoCastVector(Loc& loc, DValue* val, Type* to)
return new DImValue(to, array);
}
}
else if (totype->ty == Tvector && to->size() == val->getType()->size())
{
return new DImValue(to, val->getRVal());
}
else
{
error(loc, "invalid cast from '%s' to '%s'", val->getType()->toChars(), to->toChars());