New test.
authorMartin Baulig <martin@novell.com>
Wed, 29 Nov 2006 20:32:02 +0000 (20:32 -0000)
committerMartin Baulig <martin@novell.com>
Wed, 29 Nov 2006 20:32:02 +0000 (20:32 -0000)
svn path=/trunk/mcs/; revision=68692

mcs/tests/test-anon-62.cs [new file with mode: 0644]

diff --git a/mcs/tests/test-anon-62.cs b/mcs/tests/test-anon-62.cs
new file mode 100644 (file)
index 0000000..aba3e9d
--- /dev/null
@@ -0,0 +1,39 @@
+// Bug #79702
+public delegate void FooHandler();
+
+public class X
+{
+       private string a;
+
+       public X(string a)
+       {
+               this.a = a;
+       }
+
+       static void Main()
+       {
+       }
+}
+
+public class Y : X
+{
+       private Z a;
+       
+       public Y(Z a) : base(a.A)
+       {
+               this.a = a;
+
+               FooHandler handler = delegate {
+                       a.Hello();
+               };
+       }
+}
+
+public class Z
+{
+       public string A;
+       
+       public void Hello ()
+       {
+       }
+}