Updated with review feedback.
[mono.git] / mcs / tests / gtest-280.cs
1 //
2 // This is a test for bug 78786
3 // The issue was that the method call would trigger argument compatibility
4 // checks, and on success it would re-resolve the tree and not every
5 // expression copes with that gracefully
6 //
7
8 using System.Collections.Generic;
9
10 public class Test {
11         public delegate int TestDel (int a);
12
13         public static void Main (string[] args) {
14                 Dictionary<string, TestDel> dict = new Dictionary<string,
15 TestDel> ();
16
17                 dict["a"] = delegate (int b) {
18                         return b;
19                 };
20
21                 System.Console.WriteLine (dict["a"] (2));
22         }
23 }