Browse Source

new test

svn path=/trunk/mcs/; revision=105417
Jb Evain 17 years ago
parent
commit
b03b7bd2d4
1 changed files with 14 additions and 0 deletions
  1. 14 0
      mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs

+ 14 - 0
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs

@@ -237,5 +237,19 @@ namespace MonoTests.System.Linq.Expressions {
 
 			Assert.AreEqual ("gazonk42", del ());
 		}
+
+		[Test]
+		[Category ("NotWorking")]
+		public void HoistedParameter ()
+		{
+			var i = Expression.Parameter (typeof (int), "i");
+
+			var l = Expression.Lambda<Func<int, string>> (
+				Expression.Invoke (
+					Expression.Lambda<Func<string>> (
+						Expression.Call (i, typeof (int).GetMethod ("ToString", Type.EmptyTypes)))), i).Compile ();
+
+			Assert.AreEqual ("42", l (42));
+		}
 	}
 }