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

37 lines
525 B
C#

using System;
using System.Linq.Expressions;
struct S
{
public static int Main ()
{
Expression<Func<S?, A>> e = a => a;
// TODO: implement
// Console.WriteLine (e.Compile ()(null));
Console.WriteLine (e.Compile ()(new S ()));
Expression<Func<S?, B>> e2 = a => (B) a;
// TODO: implement
// Console.WriteLine (e2.Compile ()(null));
Console.WriteLine (e2.Compile ()(new S ()));
return 0;
}
}
class A
{
public static implicit operator A (S x)
{
return new B ();
}
}
class B : A
{
}