linux-packaging-mono/mcs/tests/gtest-etree-08.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

39 lines
554 B
C#

using System;
using System.Linq.Expressions;
class Foo
{
int ThisMethod ()
{
return 33;
}
public int Goo (bool hoo)
{
bool local_hoo = hoo;
Expression<Func<bool>> a = () => hoo;
if (a.Compile ()())
return 1;
if (true) {
Expression<Func<bool>> b = () => local_hoo;
if (b.Compile ()())
return 2;
}
Expression<Func<int>> c = () => ThisMethod ();
if (c.Compile ()() != 33)
return 3;
Console.WriteLine ("OK");
return 0;
}
public static int Main ()
{
var f = new Foo ();
return f.Goo (false);
}
}