2003-04-28 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Tue, 29 Apr 2003 00:54:01 +0000 (00:54 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 29 Apr 2003 00:54:01 +0000 (00:54 -0000)
* MethodBuilder.cs: Mono allows the parameter position to be zero
to indicate the "returns:" attribute.

svn path=/trunk/mcs/; revision=14085

mcs/class/corlib/System.Reflection.Emit/ChangeLog
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs

index b41a6872599d5e55f68b5189144d068b0b2930fb..b76cf5745bc09914d3d6d466cb7994abcee4f45d 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-28  Miguel de Icaza  <miguel@ximian.com>
+
+       * MethodBuilder.cs: Mono allows the parameter position to be zero
+       to indicate the "returns:" attribute.
+
 2003-04-20  Miguel de Icaza  <miguel@ximian.com>
 
        * ILGenerator.cs (EmitCall): Implement.
index 428ae4ae479877052751354de3ec357cb8925eec..25f75996a33111d0768a4d6b9c77370057af24fe 100755 (executable)
@@ -164,7 +164,10 @@ namespace System.Reflection.Emit {
                [MonoTODO]
                public ParameterBuilder DefineParameter (int position, ParameterAttributes attributes, string strParamName)
                {
-                       if ((position < 1) || (position > parameters.Length))
+                       //
+                       // Extension: Mono allows position == 0 for the return attribute
+                       //
+                       if ((position < 0) || (position > parameters.Length))
                                throw new ArgumentOutOfRangeException ("position");
 
                        RejectIfCreated ();