Index: src/Virtual/ExpandCasts.cc
===================================================================
--- src/Virtual/ExpandCasts.cc	(revision 08fc48f4a5c70b7f3e402da3afef2763f754ff3a)
+++ src/Virtual/ExpandCasts.cc	(revision 7e4b44db4aee3e4db9e5c3f78521d2db85fd048b)
@@ -139,5 +139,5 @@
 		ObjectDecl * table = found->second;
 
-		Expression * result = new CastExpr(
+		return new CastExpr{
 			//new ApplicationExpr(
 				//new AddressExpr( new VariableExpr( vcast_decl ) ),
@@ -158,10 +158,5 @@
 				} ),
 			castExpr->get_result()->clone()
-			);
-
-		castExpr->set_arg( nullptr );
-		castExpr->set_result( nullptr );
-		delete castExpr;
-		return result;
+		};
 	}
 
