mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-03 04:50:05 +02:00
fixes #431 :: apply DMDFE 1.062; thanks SiegeLord
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user