Author: marek
Date: 2005-11-07 04:18:19 -0500 (Mon, 07 Nov 2005)
New Revision: 52642
Added:
trunk/mcs/errors/cs0162-4.cs
trunk/mcs/errors/cs1540-7.cs
Modified:
trunk/mcs/errors/cs1540.cs
trunk/mcs/errors/known-issues-gmcs
Log:
new tests
Added: trunk/mcs/errors/cs0162-4.cs
===================================================================
--- trunk/mcs/errors/cs0162-4.cs 2005-11-07 09:05:01 UTC (rev 52641)
+++ trunk/mcs/errors/cs0162-4.cs 2005-11-07 09:18:19 UTC (rev 52642)
@@ -0,0 +1,15 @@
+// cs0162.cs: Unreachable code detected
+// Line: 13
+// Compiler options: -warnaserror -warn:2
+
+using System;
+
+class C {
+ bool T () { return true; }
+
+ void Close()
+ {
+ if (T () && false)
+ Console.WriteLine ("error");
+ }
+}
Added: trunk/mcs/errors/cs1540-7.cs
===================================================================
--- trunk/mcs/errors/cs1540-7.cs 2005-11-07 09:05:01 UTC (rev 52641)
+++ trunk/mcs/errors/cs1540-7.cs 2005-11-07 09:18:19 UTC (rev 52642)
@@ -0,0 +1,22 @@
+// cs1540-7.cs: Cannot access protected member `A.Test' via a qualifier of
type `B'; the qualifier must be of type `C' (or derived from it)
+// Line: 17
+
+class A
+{
+ protected object[] Test { get { return null; } }
+}
+
+class B : A
+{
+}
+
+class C: A
+{
+ public void Test2 (B b)
+ {
+ foreach (object o in b.Test)
+ {
+ }
+ }
+
+}
Modified: trunk/mcs/errors/cs1540.cs
===================================================================
--- trunk/mcs/errors/cs1540.cs 2005-11-07 09:05:01 UTC (rev 52641)
+++ trunk/mcs/errors/cs1540.cs 2005-11-07 09:18:19 UTC (rev 52642)
@@ -3,12 +3,12 @@
class A
{
- protected int n;
+ protected int n;
}
class B : A
{
- public static void Main ()
+ public static void Main ()
{
A b = new A ();
b.n = 1;
Modified: trunk/mcs/errors/known-issues-gmcs
===================================================================
--- trunk/mcs/errors/known-issues-gmcs 2005-11-07 09:05:01 UTC (rev 52641)
+++ trunk/mcs/errors/known-issues-gmcs 2005-11-07 09:18:19 UTC (rev 52642)
@@ -44,3 +44,5 @@
cs1641.cs
cs1666.cs NO ERROR
cs1906.cs NO ERROR
+cs0162-4.cs
+cs1540-7.cs
\ No newline at end of file
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches