Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / gtest-etree-29.cs
1 using System.Linq.Expressions;
2 using System;
3
4 class C
5 {
6         public static int Main ()
7         {
8                 Expression<Func<bool, IA>> e = (arg) => arg ? new B2 () : (IA) new B1 ();
9                 var cond = (ConditionalExpression) e.Body;
10                 if (cond.NodeType != ExpressionType.Conditional)
11                         return 1;
12                 if (cond.IfTrue.NodeType != ExpressionType.Convert)
13                         return 2;
14                 if (cond.IfFalse.NodeType != ExpressionType.Convert)
15                         return 3;
16
17                 e.Compile () (true);
18                 return 0;
19         }
20 }
21
22 interface IA
23 {
24 }
25
26 class B2 : IA
27 {
28 }
29
30 class B1 : IA
31 {
32 }