瀏覽代碼

Fixing formatting glitches in my previous bug #3912 solution

Signed-off-by: Gleb Golubitsky <[email protected]>
Gleb Golubitsky 14 年之前
父節點
當前提交
a0181c6c91

+ 2 - 1
mcs/class/corlib/System.Reflection.Emit/ParameterBuilder.cs

@@ -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.");
 			}

+ 1 - 1
mcs/class/corlib/Test/System.Reflection.Emit/ParameterBuilderTest.cs

@@ -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>