2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Dec 2008 15:37:32 +0000 (15:37 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Dec 2008 15:37:32 +0000 (15:37 -0000)
Backport of r122036.

* bug-461867.cs: New regression test.

* Makefile.am: Test added.

svn path=/branches/mono-2-2/mono/; revision=122039

mono/tests/ChangeLog
mono/tests/Makefile.am
mono/tests/bug-461867.cs [new file with mode: 0644]

index 5bd5e2e1b18b81e10d264566482bc8bc4b65899c..99fbd153095dbe88baf8e111c247361b71ec27ca 100644 (file)
@@ -1,3 +1,11 @@
+2008-12-23  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       Backport of r122036.
+
+       * bug-461867.cs: New regression test.
+
+       * Makefile.am: Test added.
+
 2008-12-19  Mark Probst  <mark.probst@gmail.com>
 
        * bug-459285.2.cs: New generic sharing test.
index c5b046f34768be5812a5428190cc23821ebb1b7f..0e77dbc7260a94d28037d7ccb12105fa1b86c821 100644 (file)
@@ -323,7 +323,8 @@ BASE_TEST_CS_SRC=           \
        bug-81673.cs    \
        bug-81691.cs    \
        bug-80307.cs    \
-       bug-415577.cs
+       bug-415577.cs   \
+       bug-461867.cs
 
 if AMD64
 TEST_CS_SRC = $(BASE_TEST_CS_SRC) async-exc-compilation.cs
diff --git a/mono/tests/bug-461867.cs b/mono/tests/bug-461867.cs
new file mode 100644 (file)
index 0000000..eb2d89d
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace TestApp
+{
+       public delegate char MyDelegate(int x);
+
+    class Driver
+    {
+               static char Test (int x) { return (char)x; }
+
+               static int Main()
+               {
+                       MyDelegate m = Driver.Test;
+                       Marshal.GetFunctionPointerForDelegate (m);
+                       return 0;
+               }
+       }
+}