- TypeExpr ute = ResolveBaseTypeExpr (BaseType, false, Location);
- UnderlyingType = ute.Type;
-
- if (UnderlyingType != TypeManager.int32_type &&
- UnderlyingType != TypeManager.uint32_type &&
- UnderlyingType != TypeManager.int64_type &&
- UnderlyingType != TypeManager.uint64_type &&
- UnderlyingType != TypeManager.short_type &&
- UnderlyingType != TypeManager.ushort_type &&
- UnderlyingType != TypeManager.byte_type &&
- UnderlyingType != TypeManager.sbyte_type) {
- Report.Error (1008, Location,
- "Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
- return null;
- }
-
- if (IsTopLevel) {
- if (TypeManager.NamespaceClash (Name, Location))
- return null;
-
- ModuleBuilder builder = CodeGen.Module.Builder;
-
- TypeBuilder = builder.DefineType (Name, TypeAttr, TypeManager.enum_type);
- } else {
- TypeBuilder builder = Parent.TypeBuilder;
-
- TypeBuilder = builder.DefineNestedType (
- Basename, TypeAttr, TypeManager.enum_type);
- }
+ public static void Error_1008 (Location loc)
+ {
+ Report.Error (1008, loc, "Type byte, sbyte, short, ushort, " +
+ "int, uint, long or ulong expected");
+ }