Fixing formatting glitches in my previous bug #3912 solution
authorGleb Golubitsky <sectoid@gnolltech.org>
Thu, 15 Mar 2012 16:06:25 +0000 (18:06 +0200)
committerGleb Golubitsky <sectoid@gnolltech.org>
Thu, 15 Mar 2012 16:06:25 +0000 (18:06 +0200)
Signed-off-by: Gleb Golubitsky <sectoid@gnolltech.org>
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs
mcs/class/corlib/Test/System.Reflection.Emit/ParameterBuilderTest.cs

index dafd227be717d55144e025f62b6689b8342ffa79..a6a246d1074568c7516d08f3e489e4e804c716bc 100644 (file)
@@ -95,9 +95,10 @@ namespace System.Reflection.Emit {
                {
                        if (position > 0) {
                                Type t = methodb.GetParameterType (position - 1);
-                               if (defaultValue != null && t != defaultValue.GetType ())
+                               if (defaultValue != null && t != defaultValue.GetType ()) {
                                        if(!t.IsEnum || t.UnderlyingSystemType != defaultValue.GetType ())
                                                throw new ArgumentException ("Constant does not match the defined type.");
+                               }
                                if (t.IsValueType && !t.IsPrimitive && !t.IsEnum && t != typeof (DateTime))
                                        throw new ArgumentException ("" + t + " is not a supported constant type.");
                        }
index a39835d5e506f565ec6e04d2714daf83ca211dbe..f997674b604af346ad3b2347cc847a418077c9fb 100644 (file)
@@ -15,7 +15,7 @@ namespace MonoTests.System.Reflection.Emit
        /// A test fixture for System.Reflection.Emit.ParameterBuilder class
        /// </summary>
        [TestFixture]
-       public class AssemblyBuilderAccessTest
+       public class ParameterBuilderTest
        {
                [Test]
                /// <summary>