in System.Collections.Generic:
[mcs.git] / tests / gtest-etree-19.cs
blob12ce1cc5245e900219d26f6d5331fecf05209112
1 using System;
2 using System.Linq.Expressions;
4 public class Test
6 public static int Main ()
8 if (Value<int> () != 0)
9 return 1;
11 var v = Value<Test> ();
12 return 0;
15 static T Value<T> () where T : new ()
17 Expression<Func<T>> e = () => new T ();
18 var et = e.Body.NodeType;
19 if (et != ExpressionType.New)
20 throw new ApplicationException (et.ToString ());
22 return e.Compile ().Invoke ();