fixing trouble with casting from float reference to int, issue #1068
This commit is contained in:
7
expr.cpp
7
expr.cpp
@@ -7229,10 +7229,11 @@ TypeCastExpr::TypeCheck() {
|
|||||||
|
|
||||||
// And otherwise see if it's one of the conversions allowed to happen
|
// And otherwise see if it's one of the conversions allowed to happen
|
||||||
// implicitly.
|
// implicitly.
|
||||||
if (CanConvertTypes(fromType, toType, "type cast expression", pos) == false)
|
Expr *e = TypeConvertExpr(expr, toType, "type cast expression");
|
||||||
|
if (e == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
else
|
||||||
return this;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user