Index: src/CodeTools/ResolvProtoDump.cc
===================================================================
--- src/CodeTools/ResolvProtoDump.cc	(revision 3b3491b6cedeff816eea57a2ae4762471718ac1f)
+++ src/CodeTools/ResolvProtoDump.cc	(revision b1816398335b62df41235fdacb00551553884eb0)
@@ -37,5 +37,5 @@
 	class ProtoDump : public WithShortCircuiting, public WithVisitorRef<ProtoDump> {
 		std::set<std::string> decls;               ///< Declarations in this scope
-		std::set<std::string> exprs;               ///< Expressions in this scope
+		std::vector<std::string> exprs;            ///< Expressions in this scope
 		std::vector<PassVisitor<ProtoDump>> subs;  ///< Sub-scopes
 		const ProtoDump* parent;                   ///< Outer lexical scope
@@ -63,5 +63,5 @@
 		/// adds a new expression to this scope
 		void addExpr( const std::string& s ) {
-			if ( ! s.empty() ) { exprs.insert( s ); }
+			if ( ! s.empty() ) { exprs.emplace_back( s ); }
 		}
 
@@ -198,6 +198,12 @@
 
 			// arrays represented as generic type
-			void previsit( ArrayType* ) { ss << "#$arr<"; ++depth; }
-			void postvisit( ArrayType* ) { --depth; ss << '>'; }
+			void previsit( ArrayType* at ) {
+				ss << "#$arr<";
+				++depth;
+				at->base->accept( *visitor );
+				--depth;
+				ss << '>';
+				visit_children = false;
+			}
 
 			// ignore top-level reference types, they're mostly transparent to resolution
@@ -380,6 +386,11 @@
 			}
 
-			/// Casts replaced with arguments 
-			/// TODO put casts in resolv-proto
+			/// Casts replaced with result type
+			/// TODO put cast target functions in, and add second expression for target
+			void previsit( CastExpr* cast ) {
+				PassVisitor<TypePrinter> tyPrinter{ ss };
+				cast->result->accept( tyPrinter );
+				visit_children = false;
+			}
 			
 			/// Member access handled as function from aggregate to member
