Shut up all those warnings
authorMiguel de Icaza <miguel@gnome.org>
Tue, 22 Jan 2008 22:50:33 +0000 (22:50 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Tue, 22 Jan 2008 22:50:33 +0000 (22:50 -0000)
svn path=/trunk/mcs/; revision=93597

mcs/class/System.Core/Makefile
mcs/class/System.Core/System.Core_test.dll.sources
mcs/class/System.Core/System.Linq.Expressions/Expression.cs
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Equal.cs
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Lambda.cs
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Utils.cs
mcs/class/System.Core/Test/System.Linq/EnumerableMoreTest.cs
mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs

index 37200349b08678a8efbe49e117aeeae4cd1bc741..421c059b9cf6b491276936f6658a8e81268a248a 100644 (file)
@@ -7,7 +7,7 @@ LIBRARY = System.Core.dll
 LIB_MCS_FLAGS = -unsafe -d:LIBC /r:$(corlib)
 
 ifeq (2.0, $(FRAMEWORK_VERSION))
-LIB_MCS_FLAGS += -d:NET_3_5
+LIB_MCS_FLAGS += -d:NET_3_5 -nowarn:1720
 endif
 
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
index 0c22ca00fe34b775e9b2e11d492de2d9564ad747..e172564a5eb64e520961797fd18c32c2788cb14b 100644 (file)
@@ -32,6 +32,7 @@ System.Linq.Expressions/ExpressionTest_NewArrayBounds.cs
 System.Linq.Expressions/ExpressionTest_NewArrayInit.cs
 System.Linq.Expressions/ExpressionTest_Not.cs
 System.Linq.Expressions/ExpressionTest_Or.cs
+System.Linq.Expressions/ExpressionTest_OrElse.cs
 System.Linq.Expressions/ExpressionTest_Power.cs
 System.Linq.Expressions/ExpressionTest_Quote.cs
 System.Linq.Expressions/ExpressionTest_RightShift.cs
index 263578e504655df7ad1f1396c02e73e9d3fb3909..bcb898be0152c894b68b3e720f4b2a4eb15bb2d2 100644 (file)
@@ -587,7 +587,7 @@ namespace System.Linq.Expressions {
 
                public static BinaryExpression AndAlso (Expression left, Expression right, MethodInfo method)
                {
-                       method = BinaryCoreCheck ("op_LogicalAnd", left, right, method);
+                       method = BinaryCoreCheck ("op_BitwiseAnd", left, right, method);
 
                        return MakeBoolBinary (ExpressionType.AndAlso, left, right, false, method);
                }
@@ -599,7 +599,11 @@ namespace System.Linq.Expressions {
 
                public static BinaryExpression OrElse (Expression left, Expression right, MethodInfo method)
                {
-                       method = BinaryCoreCheck ("op_LogicalOr", left, right, method);
+                       method = BinaryCoreCheck ("op_BitwiseOr", left, right, method);
+                       if (method == null){
+                               if (left.Type != typeof (bool))
+                                       throw new InvalidOperationException ("Only booleans are allowed for OrElse");
+                       }
 
                        return MakeBoolBinary (ExpressionType.OrElse, left, right, false, method);
                }
index 2f268fce455b6073d82700638e75a4dd399bf5e6..4d277c5fc90bfe1f676e78b5336c9490df98aea1 100644 (file)
@@ -119,8 +119,8 @@ namespace MonoTests.System.Linq.Expressions
                        int? a = 1;
                        int b = 2;
 
-                       BinaryExpression expr = Expression.Equal (Expression.Constant (a, typeof (int?)),
-                                                                 Expression.Constant (b, typeof (int)));
+                       Expression.Equal (Expression.Constant (a, typeof (int?)),
+                                         Expression.Constant (b, typeof (int)));
                }
 
                [Test]
index 635dcb0f8fabdcf689c40214b90ec098daad4d94..5b0faa3884e9dee5c2c3618235bdaefe8db2bef7 100644 (file)
@@ -161,7 +161,7 @@ namespace MonoTests.System.Linq.Expressions
 
                        // This should throw, since the add.Type is "int?" and the return
                        // type we have here is int.
-                       Expression<Func<int?, int?, int>> efu = Expression.Lambda<Func<int?,int?,int>> (add, p1, p2);
+                       Expression.Lambda<Func<int?,int?,int>> (add, p1, p2);
                }
        }
 }
index 5b6f7daada5540780f402f5a14b5184a99d4dd5b..afd05b7607065d82276bc86325adcec9e48c7022 100644 (file)
@@ -192,7 +192,7 @@ namespace MonoTests.System.Linq.Expressions
                public delegate int TestDelegate(int i);
                public event TestDelegate TestEvent;
 
-               void DoNothing ()
+               public void DoNothing ()
                {
                        // Just to avoid a compiler warning
                        if (TestEvent != null)
index e98c49745e67532ed4a0e4531f1279c556bd7fce..70c6233fcd90a7ff8cfa03b016971bf92733cd9e 100644 (file)
@@ -416,7 +416,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ElementAtArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // ElementAt<TSource> (int)
@@ -439,7 +439,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ElementAtOrDefaultArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // ElementAtOrDefault<TSource> (int)
@@ -554,7 +554,7 @@ namespace MonoTests.System.Linq {
                [Ignore ("Takes some time.")]
                public void CountOverflowTest ()
                {
-                       BigEnumerable data = new BigEnumerable ((ulong) int.MaxValue + 1);
+                       //BigEnumerable data = new BigEnumerable ((ulong) int.MaxValue + 1);
 
                        // Count<TSource> ()
                        //AssertException<OverflowException> (delegate () { data.Count (); });
@@ -598,7 +598,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ContainsArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Contains<TSource> (TSource)
@@ -1402,7 +1402,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void TakeArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Take<TSource> (int)
@@ -1453,7 +1453,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void SkipArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Skip<TSource> (int)
@@ -1843,7 +1843,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void DistinctArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Distinct<TSource> ()
@@ -1959,7 +1959,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ReverseArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Reverse<TSource> ()
@@ -2019,7 +2019,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void AsEnumerableArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
                }
 
@@ -2036,7 +2036,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ToArrayArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // ToArray<TSource> ()
@@ -2057,7 +2057,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void ToListArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // ToList<string> ()
@@ -2183,7 +2183,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void DefaultIfEmptyArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // DefaultIfEmpty<string> ()
@@ -2214,7 +2214,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void OfTypeArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // OfType<string> ()
@@ -2235,7 +2235,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void CastArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
 
                        // Cast<string> ()
@@ -2258,7 +2258,7 @@ namespace MonoTests.System.Linq {
                [Test]
                public void RangeArgumentNullTest ()
                {
-                       string [] data = { "2", "1", "5", "3", "4" };
+                       //string [] data = { "2", "1", "5", "3", "4" };
 
                }
 
index a2e9460f95827d2a395b7cd3fc74caf86b92c977..2cfaa7184ad4362245a0bec8a480414e1acc3481 100644 (file)
@@ -42,6 +42,7 @@ namespace MonoTests.System
                                if (Environment.OSVersion.Platform != PlatformID.Unix)
                                        return;
                                TimeZoneInfo local = TimeZoneInfo.Local;
+                               Assert.IsNotNull (local);
                                Assert.IsTrue (true);
                        }
                }