diff options
author | Miguel de Icaza <miguel@gnome.org> | 2004-12-03 00:38:57 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2004-12-03 00:38:57 +0300 |
commit | 4563467f195545a11eaf603af82ab6db013bb53e (patch) | |
tree | 4276368543f3bfbabc04f3226ef4f899b3cf2015 /mcs/tests/test-326.cs | |
parent | 23ca2e663f8a10965de5d7e49ac439ec5924a736 (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.cs | 20 |
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; + } +} |