Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
+++ src/AST/Convert.cpp	(revision 3e5439987bdaca8e3f69edabd5a99bb0e41316b1)
@@ -305,11 +305,11 @@
 	}
 
-	const ast::Decl * visit( const ast::EnumDecl * node ) override final { // Marker: what is this for? 
-	// Called in ConverterNewToOld
+	const ast::Decl * visit( const ast::EnumDecl * node ) override final {
 		if ( inCache( node ) ) return nullptr;
 		auto decl = new EnumDecl(
 			node->name,
 			get<Attribute>().acceptL( node->attributes ),
-			LinkageSpec::Spec( node->linkage.val )
+			LinkageSpec::Spec( node->linkage.val ),
+			get<Type>().accept1(node->base)
 		);
 		return aggregatePostamble( decl, node ); // Node info, including members, processed in aggregatePostamble
@@ -2768,6 +2768,6 @@
 	}
 
-	virtual void visit( const EnumInstType * old ) override final {
-		ast::EnumInstType * ty;
+	virtual void visit( const EnumInstType * old ) override final { // Here is visiting the EnumInst Decl not the usage.
+		ast::EnumInstType * ty; 
 		if ( old->baseEnum ) {
 			ty = new ast::EnumInstType{
Index: src/AST/Decl.cpp
===================================================================
--- src/AST/Decl.cpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
+++ src/AST/Decl.cpp	(revision 3e5439987bdaca8e3f69edabd5a99bb0e41316b1)
@@ -137,27 +137,27 @@
 			
 		// Handle typed enum by casting the value in (C++) compiler
-		if ( base ) { // A typed enum
-			if ( const BasicType * bt = dynamic_cast<const BasicType *>(base) ) {
-				switch( bt->kind ) {
-					case BasicType::Kind::Bool:	value = (bool) it->second; break;
-					case BasicType::Kind::Char: value = (char) it->second; break;
-					case BasicType::Kind::SignedChar: value = (signed char) it->second; break;
-					case BasicType::Kind::UnsignedChar: value = (unsigned char) it->second; break;
-					case BasicType::Kind::ShortSignedInt: value = (short signed int) it->second; break;
-					case BasicType::Kind::SignedInt: value = (signed int) it->second; break;
-					case BasicType::Kind::UnsignedInt: value = (unsigned int) it->second; break;
-					case BasicType::Kind::LongSignedInt: value = (long signed int) it->second; break;
-					case BasicType::Kind::LongUnsignedInt: value = (long unsigned int) it->second; break;
-					case BasicType::Kind::LongLongSignedInt: value = (long long signed int) it->second; break;
-					case BasicType::Kind::LongLongUnsignedInt: value = (long long unsigned int) it->second; break; 
-					// TODO: value should be able to handle long long unsigned int
+		// if ( base ) { // A typed enum
+		// 	if ( const BasicType * bt = dynamic_cast<const BasicType *>(base) ) {
+		// 		switch( bt->kind ) {
+		// 			case BasicType::Kind::Bool:	value = (bool) it->second; break;
+		// 			case BasicType::Kind::Char: value = (char) it->second; break;
+		// 			case BasicType::Kind::SignedChar: value = (signed char) it->second; break;
+		// 			case BasicType::Kind::UnsignedChar: value = (unsigned char) it->second; break;
+		// 			case BasicType::Kind::ShortSignedInt: value = (short signed int) it->second; break;
+		// 			case BasicType::Kind::SignedInt: value = (signed int) it->second; break;
+		// 			case BasicType::Kind::UnsignedInt: value = (unsigned int) it->second; break;
+		// 			case BasicType::Kind::LongSignedInt: value = (long signed int) it->second; break;
+		// 			case BasicType::Kind::LongUnsignedInt: value = (long unsigned int) it->second; break;
+		// 			case BasicType::Kind::LongLongSignedInt: value = (long long signed int) it->second; break;
+		// 			case BasicType::Kind::LongLongUnsignedInt: value = (long long unsigned int) it->second; break; 
+		// 			// TODO: value should be able to handle long long unsigned int
 
-					default:
-					value = it->second;
-				}
-			}
-		} else {
+		// 			default:
+		// 			value = it->second;
+		// 		}
+		// 	}
+		// } else {
 			value = it->second;
-		}
+		//}
 
 		return true;
Index: src/AST/Decl.hpp
===================================================================
--- src/AST/Decl.hpp	(revision f135b50a1177372bc7dd5a2dcf75591c4b6ee098)
+++ src/AST/Decl.hpp	(revision 3e5439987bdaca8e3f69edabd5a99bb0e41316b1)
@@ -302,5 +302,5 @@
 class EnumDecl final : public AggregateDecl {
 public:
-	Type * base;
+	ptr<Type> base;
 
 	EnumDecl( const CodeLocation& loc, const std::string& name,
