-
- public override TypeBuilder DefineType ()
- {
- if (TypeBuilder != null)
- return TypeBuilder;
-
- if (!(BaseType is TypeLookupExpression)) {
- Report.Error (1008, Location,
- "Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
- return null;
- }
-
- TypeExpr ute = BaseType.ResolveAsTypeTerminal (this, false);
- 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;