Index: src/Validate/GenericParameter.cpp
===================================================================
--- src/Validate/GenericParameter.cpp	(revision 14c0f7b320884dd43e70581e8f48fa7e2a8bc5c0)
+++ src/Validate/GenericParameter.cpp	(revision 2261bcccc0eb496b4f1887e2e4e195acfed9524b)
@@ -301,5 +301,8 @@
 const ast::Expr * TranslateDimensionCore::postvisit(
 		const ast::TypeExpr * expr ) {
-	// Does nothing, except prevents matching ast::Expr (above).
+	if ( auto instType = dynamic_cast<const ast::EnumInstType *>( expr->type.get() ) ) {
+		const ast::EnumDecl * baseEnum = instType->base.get();
+		return ast::ConstantExpr::from_int( expr->location, baseEnum->members.size() );
+	}
 	return expr;
 }
