|
|
@@ -147,6 +147,15 @@ namespace MonoTests.System.Linq.Expressions {
|
|
|
Assert.AreEqual ("foo", p.ToString ());
|
|
|
}
|
|
|
|
|
|
+ [Test]
|
|
|
+ [Category ("NotDotNet")]
|
|
|
+ [Category ("NotWorking")]
|
|
|
+ [ExpectedException (typeof (ArgumentException))]
|
|
|
+ public void VoidParameter ()
|
|
|
+ {
|
|
|
+ Expression.Parameter (typeof (void), "hello");
|
|
|
+ }
|
|
|
+
|
|
|
static int buffer;
|
|
|
|
|
|
public static int Identity (int i)
|
|
|
@@ -227,5 +236,20 @@ namespace MonoTests.System.Linq.Expressions {
|
|
|
|
|
|
Assert.AreEqual ("gazonk42", del ());
|
|
|
}
|
|
|
+
|
|
|
+ [Test]
|
|
|
+ public void HoistedLocals ()
|
|
|
+ {
|
|
|
+ var left = Expression.Parameter (typeof (int), "left");
|
|
|
+ var right = Expression.Parameter (typeof (int), "right");
|
|
|
+
|
|
|
+ var l = Expression.Lambda<Func<int, int, int>> (
|
|
|
+ Expression.Invoke (
|
|
|
+ Expression.Quote (
|
|
|
+ Expression.Lambda<Func<int>> (
|
|
|
+ Expression.Add (left, right)))), left, right);
|
|
|
+
|
|
|
+ var lc = l.Compile ();
|
|
|
+ }
|
|
|
}
|
|
|
}
|