New anonymous method tests.
authorMartin Baulig <martin@novell.com>
Thu, 14 Sep 2006 16:22:50 +0000 (16:22 -0000)
committerMartin Baulig <martin@novell.com>
Thu, 14 Sep 2006 16:22:50 +0000 (16:22 -0000)
svn path=/trunk/mcs/; revision=65414

mcs/errors/cs0158-2.cs [new file with mode: 0644]
mcs/errors/cs0158-3.cs [new file with mode: 0644]
mcs/errors/cs0158-4.cs [new file with mode: 0644]
mcs/errors/known-issues-gmcs
mcs/errors/known-issues-mcs

diff --git a/mcs/errors/cs0158-2.cs b/mcs/errors/cs0158-2.cs
new file mode 100644 (file)
index 0000000..d383c12
--- /dev/null
@@ -0,0 +1,30 @@
+// CS0158: The label `Foo' shadows another label by the same name in a contained scope
+// Line: 17
+using System;
+
+public delegate void Hello (Test test);
+
+public class Test
+{
+       public void Whatever ()
+       { }
+
+       static void RunIt (Test t)
+       {
+       Foo:
+               Hello hello = delegate (Test test) {
+                       Hello hello2 = delegate (Test test2) {
+                               Foo:
+                               test2.Whatever ();
+                       };
+                       hello2 (test);
+               };
+               hello (t);
+       }
+
+       static void Main ()
+       {
+               Test t = new Test ();
+               RunIt (t);
+       }
+}
diff --git a/mcs/errors/cs0158-3.cs b/mcs/errors/cs0158-3.cs
new file mode 100644 (file)
index 0000000..d383c12
--- /dev/null
@@ -0,0 +1,30 @@
+// CS0158: The label `Foo' shadows another label by the same name in a contained scope
+// Line: 17
+using System;
+
+public delegate void Hello (Test test);
+
+public class Test
+{
+       public void Whatever ()
+       { }
+
+       static void RunIt (Test t)
+       {
+       Foo:
+               Hello hello = delegate (Test test) {
+                       Hello hello2 = delegate (Test test2) {
+                               Foo:
+                               test2.Whatever ();
+                       };
+                       hello2 (test);
+               };
+               hello (t);
+       }
+
+       static void Main ()
+       {
+               Test t = new Test ();
+               RunIt (t);
+       }
+}
diff --git a/mcs/errors/cs0158-4.cs b/mcs/errors/cs0158-4.cs
new file mode 100644 (file)
index 0000000..c19c0c9
--- /dev/null
@@ -0,0 +1,30 @@
+// CS0158: The label `Foo' shadows another label by the same name in a contained scope
+// Line: 17
+using System;
+
+public delegate void Hello (Test test);
+
+public class Test
+{
+       public void Whatever ()
+       { }
+
+       static void RunIt (Test t)
+       {
+               Hello hello = delegate (Test test) {
+                       Foo:
+                       Hello hello2 = delegate (Test test2) {
+                               Foo:
+                               test2.Whatever ();
+                       };
+                       hello2 (test);
+               };
+               hello (t);
+       }
+
+       static void Main ()
+       {
+               Test t = new Test ();
+               RunIt (t);
+       }
+}
index 6bcbee4704c0a59615854b6c67985eaab2a4f503..4b875fe057e036922794c8ce2194ecfce9433481 100644 (file)
@@ -53,3 +53,6 @@ gcs0308.cs
 #
 
 cs1673-2.cs IGNORE
+cs0158-2.cs IGNORE
+cs0158-3.cs IGNORE
+cs0158-4.cs IGNORE
index 1654fdeefe7ed4b1b429d241de6dafd4f293874a..81dbec02702324eb83e13760c169cdbecb2ba9d6 100644 (file)
@@ -36,3 +36,6 @@ cs1670-2.cs
 #
 
 cs1673-2.cs IGNORE
+cs0158-2.cs IGNORE
+cs0158-3.cs IGNORE
+cs0158-4.cs IGNORE