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

27 lines
456 B
C#

using System;
using System.Linq.Expressions;
public class FooBase { }
public class Foo : FooBase { }
public interface IHelper
{
void DoIt (FooBase foo);
}
public class Program
{
public static int Main ()
{
Expression<Action<IHelper>> e = (helper => helper.DoIt (new Foo ()));
var mce = e.Body as MethodCallExpression;
var et = mce.Arguments[0].NodeType;
Console.WriteLine (et);
if (et != ExpressionType.New)
return 1;
return 0;
}
}