fixes #431 :: apply DMDFE 1.062; thanks SiegeLord

This commit is contained in:
Moritz Warning
2010-09-27 00:06:28 +02:00
parent b032e3d1f7
commit c4e255206a
35 changed files with 918 additions and 335 deletions

View File

@@ -1,6 +1,6 @@
// Compiler implementation of the D programming language
// Copyright (c) 1999-2009 by Digital Mars
// Copyright (c) 1999-2010 by Digital Mars
// All Rights Reserved
// written by Walter Bright
// http://www.digitalmars.com
@@ -1150,8 +1150,9 @@ Expression *Cast(Type *type, Type *to, Expression *e1)
}
else
{
error(loc, "cannot cast %s to %s", e1->type->toChars(), type->toChars());
e = new IntegerExp(loc, 0, Type::tint32);
if (type != Type::terror)
error(loc, "cannot cast %s to %s", e1->type->toChars(), type->toChars());
e = new ErrorExp();
}
return e;
}