Index: src/GenPoly/GenPoly.cc
===================================================================
--- src/GenPoly/GenPoly.cc	(revision b3212de9003ac5b898990244b2bfcbc3acb1b6e1)
+++ src/GenPoly/GenPoly.cc	(revision 75f6a5fa496faa4311469b35ad1aed83bdc21e68)
@@ -120,5 +120,5 @@
 	const ast::Type * replaceTypeInst(const ast::Type * type, const ast::TypeSubstitution * env) {
 		if (!env) return type;
-		if (auto typeInst = dynamic_cast<const ast::TypeInstType*> (type)) {
+		if ( auto typeInst = dynamic_cast<const ast::TypeInstType*>(type) ) {
 			auto newType = env->lookup(typeInst);
 			if (newType) return newType;
@@ -229,5 +229,5 @@
 		auto var = typeVars.find( *inst );
 		if ( var != typeVars.end() && var->second.isComplete ) {
-
+			return inst;
 		}
 	} else if ( auto inst = dynamic_cast<ast::StructInstType const *>( type ) ) {
