Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-etree-08.cs
1 using System;
2 using System.Linq.Expressions;
3
4 class Foo
5 {
6         int ThisMethod ()
7         {
8                 return 33;
9         }
10         
11         public int Goo (bool hoo)
12         {
13                 bool local_hoo = hoo;
14
15                 Expression<Func<bool>> a = () => hoo;
16                 if (a.Compile ()())
17                         return 1;
18                 
19                 if (true) {
20                         Expression<Func<bool>> b = () => local_hoo;
21                         if (b.Compile ()())
22                                 return 2;
23                 }
24                 
25                 Expression<Func<int>> c = () => ThisMethod ();
26                 if (c.Compile ()() != 33)
27                         return 3;
28                 
29                 Console.WriteLine ("OK");
30                 return 0;
31         }
32
33         public static int Main ()
34         {
35                 var f = new Foo ();
36                 return f.Goo (false);
37         }
38 }