Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision eaa2edaac1bd677c641e00b26588e5d5bc185f04)
+++ src/ResolvExpr/Resolver.cc	(revision 0a22cda24fcefc09a8507da53bed0e32e13f4714)
@@ -113,4 +113,16 @@
 			env.makeSubstitution( *expr->get_env() );
 		}
+
+		void removeExtraneousCast( Expression *& expr, const SymTab::Indexer & indexer ) {
+			if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( expr ) ) {
+				if ( ResolvExpr::typesCompatible( castExpr->arg->result, castExpr->result, indexer ) ) {
+					// cast is to the same type as its argument, so it's unnecessary -- remove it
+					expr = castExpr->arg;
+					castExpr->arg = nullptr;
+					std::swap( expr->env, castExpr->env );
+					delete castExpr;
+				}
+			}
+		}
 	} // namespace
 
@@ -151,12 +163,5 @@
 		untyped = new CastExpr( untyped, type );
 		findSingleExpression( untyped, indexer );
-		if ( CastExpr * castExpr = dynamic_cast< CastExpr * >( untyped ) ) {
-			if ( ResolvExpr::typesCompatible( castExpr->arg->result, castExpr->result, indexer ) ) {
-				// cast is to the same type as its argument, so it's unnecessary -- remove it
-				untyped = castExpr->arg;
-				castExpr->arg = nullptr;
-				delete castExpr;
-			}
-		}
+		removeExtraneousCast( untyped, indexer );
 	}
 
@@ -577,5 +582,5 @@
 		visit_children = false;
 		// resolve initialization using the possibilities as determined by the currentObject cursor
-		Expression * newExpr = new UntypedInitExpr( singleInit->get_value(), currentObject.getOptions() );
+		Expression * newExpr = new UntypedInitExpr( singleInit->value, currentObject.getOptions() );
 		findSingleExpression( newExpr, indexer );
 		InitExpr * initExpr = strict_dynamic_cast< InitExpr * >( newExpr );
@@ -592,4 +597,6 @@
 		// get the actual object's type (may not exactly match what comes back from the resolver due to conversions)
 		Type * initContext = currentObject.getCurrentType();
+
+		removeExtraneousCast( newExpr, indexer );
 
 		// check if actual object's type is char[]
@@ -599,9 +606,11 @@
 				if ( PointerType * pt = dynamic_cast< PointerType *>( newExpr->get_result() ) ) {
 					if ( isCharType( pt->get_base() ) ) {
-						// strip cast if we're initializing a char[] with a char *, e.g.  char x[] = "hello";
-						CastExpr *ce = strict_dynamic_cast< CastExpr * >( newExpr );
-						newExpr = ce->get_arg();
-						ce->set_arg( nullptr );
-						delete ce;
+						if ( CastExpr *ce = dynamic_cast< CastExpr * >( newExpr ) ) {
+							// strip cast if we're initializing a char[] with a char *, e.g.  char x[] = "hello";
+							newExpr = ce->get_arg();
+							ce->set_arg( nullptr );
+							std::swap( ce->env, newExpr->env );
+							delete ce;
+						}
 					}
 				}
@@ -610,5 +619,5 @@
 
 		// set initializer expr to resolved express
-		singleInit->set_value( newExpr );
+		singleInit->value = newExpr;
 
 		// move cursor to next object in preparation for next initializer
