Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-etree-20.cs
1 using System;
2 using System.Linq.Expressions;
3
4 struct S
5 {
6         public static int Main ()
7         {
8                 Expression<Func<S?, A>> e = a => a;
9                 
10                 // TODO: implement
11                 // Console.WriteLine (e.Compile ()(null));
12                 
13                 Console.WriteLine (e.Compile ()(new S ()));
14                 
15                 Expression<Func<S?, B>> e2 = a => (B) a;
16                 
17                 // TODO: implement
18                 // Console.WriteLine (e2.Compile ()(null));
19                 
20                 Console.WriteLine (e2.Compile ()(new S ()));
21                 
22                 return 0;
23         }
24 }
25
26 class A
27 {
28         public static implicit operator A (S x)
29         {
30                 return new B ();
31         }
32 }
33
34 class B : A
35 {
36 }