fixed bug in fold's traversal of cast exprs

This commit is contained in:
John Clements 2013-06-07 17:14:06 -07:00
parent d876a721d2
commit cd4e637ae4

View File

@ -545,7 +545,7 @@ pub fn noop_fold_expr(e: &Expr_, fld: @ast_fold) -> Expr_ {
ExprDoBody(f) => ExprDoBody(fld.fold_expr(f)),
ExprLit(_) => (*e).clone(),
ExprCast(expr, ref ty) => {
ExprCast(fld.fold_expr(expr), (*ty).clone())
ExprCast(fld.fold_expr(expr), fld.fold_ty(ty))
}
ExprAddrOf(m, ohs) => ExprAddrOf(m, fld.fold_expr(ohs)),
ExprIf(cond, ref tr, fl) => {