Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision ca946a45b3577867588c7cb7d196558c7e1b0074)
+++ src/ResolvExpr/Unify.cc	(revision ce8c12fdff03df2cb8b704ff8bcc77c923e2b6e1)
@@ -42,4 +42,5 @@
 		virtual void visit(PointerType *pointerType);
 		virtual void visit(ArrayType *arrayType);
+		virtual void visit(ReferenceType *refType);
 		virtual void visit(FunctionType *functionType);
 		virtual void visit(StructInstType *aggregateUseType);
@@ -428,4 +429,12 @@
 	}
 
+	void Unify::visit(ReferenceType *refType) {
+		if ( ReferenceType *otherRef = dynamic_cast< ReferenceType* >( type2 ) ) {
+			result = unifyExact( refType->get_base(), otherRef->get_base(), env, needAssertions, haveAssertions, openVars, WidenMode( false, false ), indexer );
+			markAssertions( haveAssertions, needAssertions, refType );
+			markAssertions( haveAssertions, needAssertions, otherRef );
+		} // if
+	}
+
 	void Unify::visit(ArrayType *arrayType) {
 		ArrayType *otherArray = dynamic_cast< ArrayType* >( type2 );
@@ -595,5 +604,5 @@
 			TypeExpr *otherParam = dynamic_cast< TypeExpr* >(*jt);
 			assertf(otherParam, "Aggregate parameters should be type expressions");
-			
+
 			Type* paramTy = param->get_type();
 			Type* otherParamTy = otherParam->get_type();
