Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 0a22cda24fcefc09a8507da53bed0e32e13f4714)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 6137fbb8754ddae70e06461364ee568113aaa3e3)
@@ -605,5 +605,5 @@
 				Alternative newerAlt( newAlt );
 				newerAlt.env = newEnv;
-				assert( (*candidate)->get_uniqueId() );
+				assertf( (*candidate)->get_uniqueId(), "Assertion candidate does not have a unique ID: %s", toString( *candidate ).c_str() );
 				DeclarationWithType *candDecl = static_cast< DeclarationWithType* >( Declaration::declFromId( (*candidate)->get_uniqueId() ) );
 
Index: src/SymTab/Indexer.cc
===================================================================
--- src/SymTab/Indexer.cc	(revision 0a22cda24fcefc09a8507da53bed0e32e13f4714)
+++ src/SymTab/Indexer.cc	(revision 6137fbb8754ddae70e06461364ee568113aaa3e3)
@@ -571,23 +571,25 @@
 
 		if ( doDebug ) {
-			std::cout << "--- Entering scope " << scope << std::endl;
+			std::cerr << "--- Entering scope " << scope << std::endl;
 		}
 	}
 
 	void Indexer::leaveScope() {
-		using std::cout;
+		using std::cerr;
 
 		assert( scope > 0 && "cannot leave initial scope" );
+		if ( doDebug ) {
+			cerr << "--- Leaving scope " << scope << " containing" << std::endl;
+		}
 		--scope;
 
 		while ( tables && tables->scope > scope ) {
 			if ( doDebug ) {
-				cout << "--- Leaving scope " << tables->scope << " containing" << std::endl;
-				dump( tables->idTable, cout );
-				dump( tables->typeTable, cout );
-				dump( tables->structTable, cout );
-				dump( tables->enumTable, cout );
-				dump( tables->unionTable, cout );
-				dump( tables->traitTable, cout );
+				dump( tables->idTable, cerr );
+				dump( tables->typeTable, cerr );
+				dump( tables->structTable, cerr );
+				dump( tables->enumTable, cerr );
+				dump( tables->unionTable, cerr );
+				dump( tables->traitTable, cerr );
 			}
 
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision 0a22cda24fcefc09a8507da53bed0e32e13f4714)
+++ src/SynTree/ReferenceToType.cc	(revision 6137fbb8754ddae70e06461364ee568113aaa3e3)
@@ -129,4 +129,15 @@
 bool EnumInstType::isComplete() const { return baseEnum ? baseEnum->has_body() : false; }
 
+void EnumInstType::print( std::ostream &os, Indenter indent ) const {
+	using std::endl;
+
+	if ( baseEnum == nullptr ) ReferenceToType::print( os, indent );
+	else {
+		Type::print( os, indent );
+		os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body() << " ";
+	} // if
+}
+
+
 std::string TraitInstType::typeString() const { return "trait"; }
 
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 0a22cda24fcefc09a8507da53bed0e32e13f4714)
+++ src/SynTree/Type.h	(revision 6137fbb8754ddae70e06461364ee568113aaa3e3)
@@ -466,4 +466,6 @@
 	virtual void accept( Visitor & v ) override { v.visit( this ); }
 	virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); }
+
+	virtual void print( std::ostream & os, Indenter indent = {} ) const override;
   private:
 	virtual std::string typeString() const override;
