New test.
[mono.git] / mcs / ilasm / codegen / PrimitiveTypeRef.cs
index f731091505526b4438891250cc1edb36d6f43fe7..5df416f06d4e637b96dbd9863d1b1d2e471407e7 100644 (file)
@@ -63,7 +63,7 @@ namespace Mono.ILASM {
                 protected override BaseMethodRef CreateMethodRef (BaseTypeRef ret_type,
                         PEAPI.CallConv call_conv, string name, BaseTypeRef[] param, int gen_param_count)
                 {
-                        throw new Exception ("Should not be called");
+                        throw new InternalErrorException ("Should not be called");
                 }
 
                 public override BaseMethodRef GetMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
@@ -83,7 +83,8 @@ namespace Mono.ILASM {
 
                 protected override IFieldRef CreateFieldRef (BaseTypeRef ret_type, string name)
                 {
-                       throw new Exception ("PrimitiveType's can't have fields!");
+                        Report.Error ("PrimitiveType's can't have fields!");
+                        return null;
                 }
 
                 public BaseClassRef AsClassRef (CodeGen code_gen)