Index: src/Validate/FixQualifiedTypes.cpp
===================================================================
--- src/Validate/FixQualifiedTypes.cpp	(revision 1e30df7c247fd856856ad97d81bc81faecf5bcd5)
+++ src/Validate/FixQualifiedTypes.cpp	(revision c2b3243ebb592c712c00231ae4cd93fd4a4eea3e)
@@ -102,11 +102,8 @@
 			}
 
-
-        	auto var = new ast::ObjectDecl( t->var->location, t->name,
-			 new ast::EnumInstType(enumDecl, ast::CV::Const), nullptr, {}, ast::Linkage::Cforall );
-			var->scopeLevel = 1; // 1 for now; should copy the scopeLevel of the enumValue
+        	auto var = new ast::ObjectDecl( t->location, t->name,
+			new ast::EnumInstType(enumDecl, ast::CV::Const), nullptr, {}, ast::Linkage::Cforall );
 			var->mangleName = Mangle::mangle( var );
 			return new ast::VariableExpr( t->location, var );
-        	// return ret;
         }
 
Index: src/Validate/LinkReferenceToTypes.cpp
===================================================================
--- src/Validate/LinkReferenceToTypes.cpp	(revision 1e30df7c247fd856856ad97d81bc81faecf5bcd5)
+++ src/Validate/LinkReferenceToTypes.cpp	(revision c2b3243ebb592c712c00231ae4cd93fd4a4eea3e)
@@ -44,5 +44,4 @@
 	void postvisit( ast::UnionDecl const * decl );
 	ast::TraitDecl const * postvisit( ast::TraitDecl const * decl );
-	ast::QualifiedNameExpr const * previsit( ast::QualifiedNameExpr const * decl);
 
 private:
@@ -316,37 +315,4 @@
 }
 
-ast::QualifiedNameExpr const * LinkTypesCore::previsit( ast::QualifiedNameExpr const * decl ) {
-	// Try to lookup type
-	if ( auto objDecl = decl->type_decl.as<ast::ObjectDecl>() ) {
-		if ( auto inst = objDecl->type.as<ast::TypeInstType>()) {
-			if ( auto enumDecl = symtab.lookupEnum ( inst->name ) ) {
-				auto mut = ast::mutate( decl );
-				mut->type_decl = enumDecl;
-				auto enumInst = new ast::EnumInstType( enumDecl );
-				enumInst->name = decl->name;
-				// Adding result; addCandidate() use result
-				mut->result = enumInst;
-				decl = mut;
-			}
-		}
-	} else if ( auto enumDecl = decl->type_decl.as<ast::EnumDecl>() ) {
-		auto mut = ast::mutate( decl );
-		auto enumInst = new ast::EnumInstType( enumDecl );
-		enumInst->name = decl->name;
-		// Adding result; addCandidate() use result
-		mut->result = enumInst;
-		decl = mut;
-	}
-	// ast::EnumDecl const * decl = symtab.lookupEnum( type->name );
-	// // It's not a semantic error if the enum is not found, just an implicit forward declaration.
-	// if ( decl ) {
-	// 	// Just linking in the node.
-	// 	auto mut = ast::mutate( type );
-	// 	mut->base = const_cast<ast::EnumDecl *>( decl );
-	// 	type = mut;
-	// }
-	return decl;
-}
-
 } // namespace
 
