Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 74b007ba1f2facc85656ade19a8bab1d56bb0a82)
+++ src/ResolvExpr/Unify.cc	(revision 36a5a77ac8984b7504f7dad9906fa0e218809bfe)
@@ -143,4 +143,6 @@
 
 	bool bindVar( TypeInstType *typeInst, Type *other, const TypeDecl::Data & data, TypeEnvironment &env, AssertionSet &needAssertions, AssertionSet &haveAssertions, const OpenVarSet &openVars, WidenMode widenMode, const SymTab::Indexer &indexer ) {
+		// remove references from other, so that type variables can only bind to value types
+		other = other->stripReferences();
 		OpenVarSet::const_iterator tyvar = openVars.find( typeInst->get_name() );
 		assert( tyvar != openVars.end() );
