Index: src/AST/Decl.cpp
===================================================================
--- src/AST/Decl.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/AST/Decl.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -203,4 +203,7 @@
 }
 
+bool EnumDecl::isTyped() const { return base;}
+
+bool EnumDecl::isOpague() const { return isCfa && !isTyped(); } 
 }
 
Index: src/AST/Decl.hpp
===================================================================
--- src/AST/Decl.hpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/AST/Decl.hpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -308,17 +308,17 @@
 class EnumDecl final : public AggregateDecl {
 public:
-	// isTyped indicated if the enum has a declaration like:
+	// isCfa indicated if the enum has a declaration like:
 	// enum (type_optional) Name {...}
-	bool isTyped;
-	// if isTyped == true && base.get() == nullptr, it is a "void" type enum
+	bool isCfa;
+	// if isCfa == true && base.get() == nullptr, it is a "opague" enum
 	ptr<Type> base;
 	enum class EnumHiding { Visible, Hide } hide;
 	std::vector< ast::ptr<ast::EnumInstType>> inlinedDecl; // child enums
 
-	EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false,
+	EnumDecl( const CodeLocation& loc, const std::string& name, bool isCfa = false,
 		std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall,
 		Type const * base = nullptr, EnumHiding hide = EnumHiding::Hide,
 		std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() )
-	: AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), hide(hide), enumValues(enumValues) {}
+	: AggregateDecl( loc, name, std::move(attrs), linkage ), isCfa(isCfa), base(base), hide(hide), enumValues(enumValues) {}
 
 	/// gets the integer value for this enumerator, returning true iff value found
@@ -336,4 +336,6 @@
 
 	bool isSubTypeOf(const ast::EnumDecl *) const;
+	bool isTyped() const;
+	bool isOpague() const;
 private:
 	EnumDecl * clone() const override { return new EnumDecl{ *this }; }
Index: src/AST/Stmt.hpp
===================================================================
--- src/AST/Stmt.hpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/AST/Stmt.hpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -238,4 +238,5 @@
 	ptr<Expr> inc;
 	ptr<Expr> range_over;
+	bool is_inc;
 	ptr<Stmt> body;
 	ptr<Stmt> else_;
@@ -251,7 +252,8 @@
 			range_over(nullptr), body(body), else_(else_) {}
 
-	ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * range_over, 
+	ForStmt( const CodeLocation & loc, const std::vector<ptr<Stmt>> && inits, const Expr * range_over, bool is_inc,
 			 const Stmt * body, const Stmt * else_ )
-		: Stmt(loc, std::move(labels)), inits(std::move(inits)), range_over(range_over), body(body), else_(else_) {}
+		: Stmt(loc, std::move(labels)), inits(std::move(inits)), range_over(range_over), is_inc(is_inc), 
+		body(body), else_(else_) {}
 
 	const Stmt * accept( Visitor & v ) const override { return v.visit( this ); }
Index: src/ControlStruct/TranslateEnumRange.cpp
===================================================================
--- src/ControlStruct/TranslateEnumRange.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ControlStruct/TranslateEnumRange.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -26,7 +26,11 @@
         auto enumDecl = enumInst->base;
 
-        auto init = stmt->inits.front();
+        auto objInit = stmt->inits.front();
 
-        if (auto declStmt = init.as<ast::DeclStmt>()) {
+        auto initLocation = objInit->location;
+        auto rangeLocation = stmt->range_over->location;
+        assert( stmt->inits.size() == 1 );
+
+        if (auto declStmt = objInit.as<ast::DeclStmt>()) {
             auto decl = declStmt->decl;
             if ( auto objDecl = decl.as<ast::ObjectDecl>()) {
@@ -57,5 +61,8 @@
                 if ( !objDecl->init ) {
                     auto location = stmt->location;
-                    auto newInit = new ast::SingleInit( location, new ast::NameExpr( location, enumDecl->members.front()->name ) );
+                    ast::SingleInit * newInit;
+                    newInit = new ast::SingleInit( location, 
+                        new ast::NameExpr( location, 
+                        stmt->is_inc? enumDecl->members.front()->name: enumDecl->members.back()->name ) );
                     auto objDeclWithInit = ast::mutate_field( objDecl, &ast::ObjectDecl::init, newInit );
                     auto declWithInit = ast::mutate_field( declStmt, &ast::DeclStmt::decl, objDeclWithInit );
@@ -78,13 +85,20 @@
     auto enumInst = typeExpr->type.strict_as<ast::EnumInstType>();
     auto enumDecl = enumInst->base;
+    
+    // Both inc and dec check if the current posn less than the number of enumerator
+    // for dec, it keeps call pred until it passes 0 (the first enumerator) and underflow,
+    // it wraps around and become unsigned max
+    ast::UntypedExpr * condition = ast::UntypedExpr::createCall( location,
+        "?<=?",
+        {new ast::CastExpr(location,
+            new ast::NameExpr( location, indexName ),
+            new ast::BasicType( ast::BasicKind::UnsignedInt ),
+            ast::GeneratedFlag::ExplicitCast),
+        ast::ConstantExpr::from_ulong( location, enumDecl->members.size()-1 ) });
 
-    auto condition = ast::UntypedExpr::createCall( location, "?<=?", {
-        new ast::NameExpr( location, indexName ),
-        // ast::ConstantExpr::from_ulong( location, enumDecl->members.size() )
-        new ast::NameExpr( location, enumDecl->members.back()->name )
-    });
-    auto increment = ast::UntypedExpr::createCall( location, "succ", {
-        new ast::NameExpr( location, indexName )
-    });
+    auto increment = ast::UntypedExpr::createCall( location, 
+        stmt->is_inc? "?++": "?--",
+        { new ast::NameExpr( location, indexName ) });
+    
     auto assig = ast::UntypedExpr::createAssign( location, new ast::NameExpr( location, indexName ), increment );
     auto mut = ast::mutate_field( stmt, &ast::ForStmt::cond, condition );
Index: src/Parser/StatementNode.cpp
===================================================================
--- src/Parser/StatementNode.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/Parser/StatementNode.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -216,5 +216,5 @@
 		return new ast::ForStmt( location,
 			std::move( astinit ),
-			range_over,
+			range_over, forctl->kind == OperKinds::LThan,
 			buildMoveSingle( stmt ),
 			buildMoveOptional( else_ )
Index: src/Parser/StatementNode.hpp
===================================================================
--- src/Parser/StatementNode.hpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/Parser/StatementNode.hpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -64,6 +64,6 @@
 	ForCtrl( StatementNode * stmt, ExpressionNode * condition, ExpressionNode * change ) :
 		init( stmt ), condition( condition ), change( change ), range_over( nullptr ) {}
-	ForCtrl( StatementNode * decl, ExpressionNode * _range_over) :
-		init( decl ), condition( nullptr ), change( nullptr ),  range_over( _range_over ) {}
+	ForCtrl( StatementNode * decl, ExpressionNode * range_over, OperKinds kind ) :
+		init( decl ), condition( nullptr ), change( nullptr ),  range_over( range_over ), kind( kind ) {}
 
 	StatementNode * init;
@@ -71,4 +71,5 @@
 	ExpressionNode * change;
 	ExpressionNode * range_over;
+	OperKinds kind;
 };
 
Index: src/Parser/TypeData.cpp
===================================================================
--- src/Parser/TypeData.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/Parser/TypeData.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -1469,6 +1469,6 @@
 		ast::ObjectDecl * object = strict_dynamic_cast<ast::ObjectDecl *>( member );
 		object->isHidden = ast::EnumDecl::EnumHiding::Hide == ret->hide;
-		if ( ret->isTyped && !ret->base && cur->has_enumeratorValue() ) {
-			SemanticError( td->location, "Enumerator of enum(void) cannot have an explicit initializer value." );
+		if ( ret->isOpague() && cur->has_enumeratorValue() ) {
+			SemanticError( td->location, "Opague cannot have an explicit initializer value." );
 		} else if ( cur->has_enumeratorValue() ) {
 			object->init = new ast::SingleInit(
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/Parser/parser.yy	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -279,5 +279,5 @@
 		DeclarationNode * indexDecl = DeclarationNode::newName( new std::string(identifier->name) );
 		assert( range_over_expr );
-		return new ForCtrl( new StatementNode( indexDecl ), range_over_expr );
+		return new ForCtrl( new StatementNode( indexDecl ), range_over_expr, compop );
 	} else {
 		SemanticError( yylloc, MISSING_LOOP_INDEX ); return nullptr;
Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -698,8 +698,4 @@
 		void postvisit( const ast::CountExpr * countExpr );
 
-		const ast::Expr * makeEnumOffsetCast( const ast::EnumInstType * src, 
-			const ast::EnumInstType * dst
-			, const ast::Expr * expr, Cost minCost );
-
 		void postvisit( const ast::InitExpr * ) {
 			assertf( false, "CandidateFinder should never see a resolved InitExpr." );
@@ -1213,47 +1209,4 @@
 	}
 
-	// src is a subset of dst
-	const ast::Expr * Finder::makeEnumOffsetCast( const ast::EnumInstType * src, 
-		const ast::EnumInstType * dst,
-		const ast::Expr * expr,
-		Cost minCost ) {
-		
-		auto srcDecl = src->base;
-		auto dstDecl = dst->base;
-
-		if (srcDecl->name == dstDecl->name) return expr;
-
-		for (auto& dstChild: dstDecl->inlinedDecl) {
-			Cost c = castCost(src, dstChild, false, symtab, tenv);
-			ast::CastExpr * castToDst;
-			if (c<minCost) {
-				unsigned offset = dstDecl->calChildOffset(dstChild.get());
-				if (offset > 0) {
-					auto untyped = ast::UntypedExpr::createCall(
-						expr->location, 
-						"?+?", 
-						{ new ast::CastExpr( expr, new ast::BasicType(ast::BasicKind::SignedInt) ),
-						ast::ConstantExpr::from_int(expr->location, offset)});
-					CandidateFinder finder(context, tenv);
-					finder.find( untyped );
-					CandidateList winners = findMinCost( finder.candidates );
-					CandidateRef & choice = winners.front();
-					// choice->expr = referenceToRvalueConversion( choice->expr, choice->cost );
-					choice->expr = new ast::CastExpr(expr->location, choice->expr, dstChild, ast::GeneratedFlag::ExplicitCast);
-					// castToDst = new ast::CastExpr(choice->expr, dstChild);
-					castToDst = new ast::CastExpr( 
-						makeEnumOffsetCast( src, dstChild, choice->expr, minCost ),
-					 dst);
-
-				} else {
-					castToDst = new ast::CastExpr( expr, dst );
-				}
-				return castToDst;
-			}
-		}
-		SemanticError(expr, src->base->name + " is not a subtype of " + dst->base->name);
-		return nullptr;
-	}
-
 	void Finder::postvisit( const ast::CastExpr * castExpr ) {
 		ast::ptr< ast::Type > toType = castExpr->result;
@@ -1309,6 +1262,7 @@
 			auto argAsEnum = cand->expr->result.as<ast::EnumInstType>();
 			auto toAsEnum = toType.as<ast::EnumInstType>();
-			if ( argAsEnum && toAsEnum && argAsEnum->name != toAsEnum->name ) {	
-				ast::ptr<ast::Expr> offsetExpr = makeEnumOffsetCast(argAsEnum, toAsEnum, cand->expr, thisCost);
+			if ( argAsEnum && toAsEnum && argAsEnum->name != toAsEnum->name ) {
+				CandidateFinder subFinder(context, tenv);
+				ast::ptr<ast::Expr> offsetExpr = subFinder.makeEnumOffsetCast(argAsEnum, toAsEnum, cand->expr, thisCost);
 				cand->expr = offsetExpr;
 			}
@@ -2193,6 +2147,9 @@
 					expr->location, 
 					"?+?", 
-					{ new ast::CastExpr( expr, new ast::BasicType(ast::BasicKind::SignedInt) ),
-					ast::ConstantExpr::from_int(expr->location, offset)});
+					{ new ast::CastExpr( expr->location,
+						expr,
+						new ast::BasicType(ast::BasicKind::SignedInt),
+						ast::GeneratedFlag::ExplicitCast ),
+						ast::ConstantExpr::from_int(expr->location, offset)} );
 				CandidateFinder finder(context, env);
 				finder.find( untyped );
Index: src/ResolvExpr/CastCost.cpp
===================================================================
--- src/ResolvExpr/CastCost.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ResolvExpr/CastCost.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -53,4 +53,14 @@
 		void postvisit( const ast::EnumInstType * enumInst ) {
 			cost = conversionCost( enumInst, dst, srcIsLvalue, symtab, env );
+
+			if ( !enumInst->base->isCfa ) {
+				static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
+				Cost intCost = costCalc( integer, dst, srcIsLvalue, symtab, env );
+				cost = intCost < cost? intCost: cost;
+			} else if ( enumInst->base->isTyped() ) {
+				auto baseConversionCost = 
+					castCost( enumInst->base->base, dst, srcIsLvalue, symtab, env );
+				cost = baseConversionCost < cost? baseConversionCost: cost;
+			}
 		}
 
@@ -63,7 +73,6 @@
 				cost = conversionCost( basicType, dst, srcIsLvalue, symtab, env );
 				if ( Cost::unsafe < cost ) {
-					if (auto enumInst = dynamic_cast<const ast::EnumInstType *>(dst)) {
-						// Always explict cast only for typed enum
-						if (enumInst->base->isTyped) cost = Cost::unsafe;
+					if ( dynamic_cast<const ast::EnumInstType *>(dst)) {
+						cost = Cost::unsafe;
 					}
 				}
@@ -74,6 +83,6 @@
 			cost = conversionCost( zero, dst, srcIsLvalue, symtab, env );
 			if ( Cost::unsafe < cost ) {
-				if (auto enumInst =  dynamic_cast<const ast::EnumInstType *>(dst)) {
-					if (enumInst->base->isTyped) cost = Cost::unsafe;
+				if ( dynamic_cast<const ast::EnumInstType *>(dst)) {
+					cost = Cost::unsafe;
 				}
 			}
@@ -83,6 +92,6 @@
 			cost = conversionCost( one, dst, srcIsLvalue, symtab, env );
 			if ( Cost::unsafe < cost ) {
-				if (auto enumInst = dynamic_cast<const ast::EnumInstType *>(dst)) {
-					if (enumInst->base->isTyped) cost = Cost::unsafe;
+				if ( dynamic_cast<const ast::EnumInstType *>(dst)) {
+					cost = Cost::unsafe;
 				}
 			}
Index: src/ResolvExpr/CommonType.cpp
===================================================================
--- src/ResolvExpr/CommonType.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ResolvExpr/CommonType.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -386,5 +386,5 @@
 		} else if ( const ast::EnumInstType * enumInst = dynamic_cast< const ast::EnumInstType * >( type2 ) ) {
 			const ast::EnumDecl* enumDecl = enumInst->base;
-			if ( !enumDecl->base ) {
+			if ( !enumDecl->isCfa  ) {
 				ast::BasicKind kind = commonTypes[ basic->kind ][ ast::BasicKind::SignedInt ];
 				if (
@@ -642,5 +642,5 @@
 			const ast::EnumDecl* argDecl = argAsEnumInst->base;
 			if (argDecl->isSubTypeOf(paramDecl)) result = param;
-		} else if ( param->base && !param->base->isTyped ) {
+		} else if ( param->base && !param->base->isCfa ) {
 			auto basicType = new ast::BasicType( ast::BasicKind::UnsignedInt );
 			result = commonType( basicType, type2, tenv, need, have, open, widen);
Index: src/ResolvExpr/ConversionCost.cpp
===================================================================
--- src/ResolvExpr/ConversionCost.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ResolvExpr/ConversionCost.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -162,5 +162,5 @@
 Cost conversionCost(
 	const ast::Type * src, const ast::Type * dst, bool srcIsLvalue,
-	const ast::SymbolTable & symtab, const ast::TypeEnvironment & env
+const ast::SymbolTable & symtab, const ast::TypeEnvironment & env
 ) {
 	if ( const ast::TypeInstType * inst = dynamic_cast< const ast::TypeInstType * >( dst ) ) {
@@ -235,9 +235,20 @@
 			return ast::Pass<ConversionCost>::read( src, dst, srcIsLvalue, symtab, env, conversionCost );
 		}
+		if (const ast::EnumInstType * srcAsInst = dynamic_cast< const ast::EnumInstType * >( src )) {
+			if (srcAsInst->base && !srcAsInst->base->isCfa) {
+				static const ast::BasicType* integer = new ast::BasicType( ast::BasicKind::UnsignedInt );
+				return ast::Pass<ConversionCost>::read( integer, dst, srcIsLvalue, symtab, env, conversionCost );
+			}
+		}
 	} else {
 		assert( -1 == diff );
 		const ast::ReferenceType * dstAsRef = dynamic_cast< const ast::ReferenceType * >( dst );
 		assert( dstAsRef );
-		if ( typesCompatibleIgnoreQualifiers( src, dstAsRef->base, env ) ) {
+		auto dstBaseType = dstAsRef->base;
+		const ast::Type * newSrc = src;
+		if ( dynamic_cast< const ast::EnumInstType * >( src ) && dstBaseType.as<ast::BasicType>() ) {
+			newSrc = new ast::BasicType( ast::BasicKind::UnsignedInt );
+		}
+		if ( typesCompatibleIgnoreQualifiers( newSrc, dstAsRef->base, env ) ) {
 			if ( srcIsLvalue ) {
 				if ( src->qualifiers == dstAsRef->base->qualifiers ) {
@@ -284,7 +295,7 @@
 	if ( const ast::BasicType * dstAsBasic = dynamic_cast< const ast::BasicType * >( dst ) ) {
 		conversionCostFromBasicToBasic( basicType, dstAsBasic );
-	}	else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
-		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
-			cost = Cost::unsafe;
+	} else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
+		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isCfa ) {
+			cost = Cost::safe;
 		}
 	}
@@ -366,15 +377,9 @@
 	if ( auto dstInst = dynamic_cast<const ast::EnumInstType *>( dst ) ) {
 		cost = enumCastCost(inst, dstInst, symtab, env);
-		return;
-	}
-	static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
-	cost = costCalc( integer, dst, srcIsLvalue, symtab, env );
-	if ( !inst->base->isTyped ) {
-		if ( cost < Cost::unsafe ) {
-			cost.incSafe();
-		}
-		return;
-	}
-	cost.incUnsafe();
+	} else if ( !inst->base->isCfa ) {
+		static ast::ptr<ast::BasicType> integer = { new ast::BasicType( ast::BasicKind::SignedInt ) };
+		cost = costCalc( integer, dst, srcIsLvalue, symtab, env );
+	}
+	// cost.incUnsafe();
 }
 
@@ -454,6 +459,6 @@
 		// assuming 0p is supposed to be used for pointers?
 	} else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
-		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
-			cost = Cost::unsafe;
+		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isCfa ) {
+			cost = Cost::safe;
 		}
 	}
@@ -475,6 +480,6 @@
 		}
 	} else if ( auto dstAsEnumInst = dynamic_cast< const ast::EnumInstType * >( dst ) ) {
-		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isTyped ) {
-			cost = Cost::unsafe;
+		if ( dstAsEnumInst->base && !dstAsEnumInst->base->isCfa ) {
+			cost = Cost::safe;
 		}
 	}
Index: src/ResolvExpr/Unify.cpp
===================================================================
--- src/ResolvExpr/Unify.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/ResolvExpr/Unify.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -276,6 +276,4 @@
 	void postvisit( const ast::VoidType * ) {
 		result = dynamic_cast< const ast::VoidType * >( type2 );
-			// || tryToUnifyWithEnumValue(vt, type2, tenv, need, have, open, noWiden());
-		;
 	}
 
@@ -284,5 +282,4 @@
 			result = basic->kind == basic2->kind;
 		}
-		// result = result || tryToUnifyWithEnumValue(basic, type2, tenv, need, have, open, noWiden());
 	}
 
@@ -293,5 +290,4 @@
 				noWiden());
 		}
-		// result = result || tryToUnifyWithEnumValue(pointer, type2, tenv, need, have, open, noWiden());
 	}
 
@@ -312,5 +308,4 @@
 		result = unifyExact(
 			array->base, array2->base, tenv, need, have, open, noWiden());
-			// || tryToUnifyWithEnumValue(array, type2, tenv, need, have, open, noWiden());
 	}
 
@@ -607,20 +602,16 @@
 
 		result = unifyList( types, types2, tenv, need, have, open );
-			// || tryToUnifyWithEnumValue(tuple, type2, tenv, need, have, open, noWiden());
 	}
 
 	void postvisit( const ast::VarArgsType * ) {
 		result = dynamic_cast< const ast::VarArgsType * >( type2 );
-			// || tryToUnifyWithEnumValue(vat, type2, tenv, need, have, open, noWiden());
 	}
 
 	void postvisit( const ast::ZeroType * ) {
 		result = dynamic_cast< const ast::ZeroType * >( type2 );
-			// || tryToUnifyWithEnumValue(zt, type2, tenv, need, have, open, noWiden());
 	}
 
 	void postvisit( const ast::OneType * ) {
 		result = dynamic_cast< const ast::OneType * >( type2 );
-			// || tryToUnifyWithEnumValue(ot, type2, tenv, need, have, open, noWiden());
 	}
 };
Index: src/Validate/ImplementEnumFunc.cpp
===================================================================
--- src/Validate/ImplementEnumFunc.cpp	(revision 3c55fcdbcd55d1744f1b2f592b1b158517e23781)
+++ src/Validate/ImplementEnumFunc.cpp	(revision 4117761a350b196fe0274bfd19c566b08a3969bc)
@@ -476,5 +476,5 @@
 
 void ImplementEnumFunc::previsit(const ast::EnumDecl* enumDecl) {
-	if (!enumDecl->body || !enumDecl->isTyped) return;
+	if (!enumDecl->body || !enumDecl->isCfa) return;
 	ast::EnumInstType enumInst(enumDecl->name);
 	enumInst.base = enumDecl;
