Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2004-12-03 00:38:57 +0300
committerMiguel de Icaza <miguel@gnome.org>2004-12-03 00:38:57 +0300
commit4563467f195545a11eaf603af82ab6db013bb53e (patch)
tree4276368543f3bfbabc04f3226ef4f899b3cf2015 /mcs/tests/test-326.cs
parent23ca2e663f8a10965de5d7e49ac439ec5924a736 (diff)
Add new test for bug 70150
svn path=/trunk/mcs/; revision=36975
Diffstat (limited to 'mcs/tests/test-326.cs')
-rw-r--r--mcs/tests/test-326.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/mcs/tests/test-326.cs b/mcs/tests/test-326.cs
new file mode 100644
index 00000000000..5bbed5bae3f
--- /dev/null
+++ b/mcs/tests/test-326.cs
@@ -0,0 +1,20 @@
+// Compiler options: -langversion:default
+// Anonymous method fix, implicit conversion inside an old-style constructor
+// Bug 70150
+using System;
+public delegate double Mapper (int item);
+
+class X
+{
+ static void Main ()
+ {
+ Mapper mapper = new Mapper (delegate (int i){
+ return i * 12; });
+
+ if (mapper (3) == 36)
+ return 0;
+
+ // Failure
+ return 1;
+ }
+}