2008-12-23 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Dec 2008 14:36:43 +0000 (14:36 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 23 Dec 2008 14:36:43 +0000 (14:36 -0000)
* bug-461867.cs: New regression test.

* Makefile.am: Test added.

svn path=/trunk/mono/; revision=122036

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

index f103925272454b9847bf7e79a0c527b0d10ff7b1..da77d21f2c8fabb64e4002d59ff767c4cbacc6a0 100644 (file)
@@ -1,3 +1,9 @@
+2008-12-23  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * 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 70bdfcdd57c820095ad56be8812fdba9567ac5b6..1c96d9998aecd19847ac9b1f6e2e17a63a6dd116 100644 (file)
@@ -326,7 +326,8 @@ BASE_TEST_CS_SRC=           \
        bug-415577.cs   \
        filter-stack.cs \
        vararg2.cs      \
-       bug-389886-sre-generic-interface-instances.cs
+       bug-389886-sre-generic-interface-instances.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;
+               }
+       }
+}