[mcs] C#7 throw expression
[mono.git] / mcs / tests / gtest-etree-25.cs
1 using System;
2 using System.Linq.Expressions;
3
4 class Foo
5 {
6         public void OnBaz (IBaz baz)
7         {
8         }
9 }
10
11 interface IBar
12 {
13         void RunOnBaz (Action<IBaz> action);
14 }
15
16 interface IBaz
17 {
18 }
19
20 class C : IBar
21 {
22         public void RunOnBaz (Action<IBaz> action)
23         {
24                 action (null);
25         }
26         
27     public static int Main ()
28     {
29                 var foo = new Foo ();
30
31                 Expression<Action<IBar>> e = bar => bar.RunOnBaz (foo.OnBaz);
32                 e.Compile () (new C ());
33                 
34                 return 0;
35     }
36 }
37