2010-05-19 Jb Evain <jbevain@novell.com>
[mcs.git] / tests / gtest-etree-08.cs
blob42b54343c744a84f9710ce9a1a86de09e91a8d29
1 using System;
2 using System.Linq.Expressions;
4 class Foo
6 int ThisMethod ()
8 return 33;
11 public int Goo (bool hoo)
13 bool local_hoo = hoo;
15 Expression<Func<bool>> a = () => hoo;
16 if (a.Compile ()())
17 return 1;
19 if (true) {
20 Expression<Func<bool>> b = () => local_hoo;
21 if (b.Compile ()())
22 return 2;
25 Expression<Func<int>> c = () => ThisMethod ();
26 if (c.Compile ()() != 33)
27 return 3;
29 Console.WriteLine ("OK");
30 return 0;
33 public static int Main ()
35 var f = new Foo ();
36 return f.Goo (false);