Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision b0d9ff7d1c0e2e2925b14ceb97f88762bde87c64)
+++ src/CodeGen/CodeGenerator.cc	(revision 12df6fe35a1d7d73a64293320db6c3a0b195af33)
@@ -277,5 +277,6 @@
 		std::list< Declaration* > &memb = enumDecl->get_members();
 		if (enumDecl->base && ! memb.empty()) {
-			unsigned long long last_val = -1;
+			unsigned long long last_val = -1; // if the first enum value has no explicit initializer, 
+			// as other 
 			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
 				ObjectDecl * obj = dynamic_cast< ObjectDecl* >( *i );
@@ -289,5 +290,5 @@
 					if ( obj->get_init() ) {
 						obj->get_init()->accept( *visitor );
-						// last_val = ((ConstantExpr *)(((SingleInit *)(obj->init))->value))->constant.get_ival();
+						last_val = ((ConstantExpr *)(((SingleInit *)(obj->init))->value))->constant.get_ival();
 					} else {
 						output << ++last_val;
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision b0d9ff7d1c0e2e2925b14ceb97f88762bde87c64)
+++ src/Parser/TypeData.cc	(revision 12df6fe35a1d7d73a64293320db6c3a0b195af33)
@@ -926,5 +926,5 @@
 	list< Declaration * >::iterator members = ret->get_members().begin();
 	for ( const DeclarationNode * cur = td->enumeration.constants; cur != nullptr; cur = dynamic_cast< DeclarationNode * >( cur->get_next() ), ++members ) {
-		if ( ret->isTyped && cur->has_enumeratorValue() ) {
+		if ( ret->isTyped && !ret->base && cur->has_enumeratorValue() ) {
 			SemanticError( td->location, "Enumerator of enum(void) cannot have an explicit initializer value." );
 		} else if ( cur->has_enumeratorValue() ) {
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision b0d9ff7d1c0e2e2925b14ceb97f88762bde87c64)
+++ src/ResolvExpr/Resolver.cc	(revision 12df6fe35a1d7d73a64293320db6c3a0b195af33)
@@ -1478,7 +1478,7 @@
 			// enum type is still incomplete at this point. Use `int` instead.
 
-			if (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base) {
+			if ( auto enumBase = dynamic_cast< const ast::EnumInstType * >
+				( objectDecl->get_type() )->base->base ) {
 				objectDecl = fixObjectType( objectDecl, context );
-				const ast::Type * enumBase =  (dynamic_cast< const ast::EnumInstType * >( objectDecl->get_type() )->base->base.get());
 				currentObject = ast::CurrentObject{ 
 					objectDecl->location, 
@@ -1493,5 +1493,5 @@
 		}
 		else {
-			if (!objectDecl->isTypeFixed) {
+			if ( !objectDecl->isTypeFixed ) {
 				auto newDecl = fixObjectType(objectDecl, context);
 				auto mutDecl = mutate(newDecl);
