using System;
using System.Linq .Expressions ;
namespace X
{
public class ObjectSet< T>
{
public T[ ] x;
}
public static class ObjectContextExtensions
{
public static T[ ] Find< T> ( this ObjectSet< T> set, int id, params string[ ] includes) where T : class
{
Console.WriteLine ( "second" ) ;
return set.x ;
}
public static T[ ] Find< T> ( this ObjectSet< T> set, int id, params Expression< Func< T, object>> [ ] includes) where T : class
{
Console.WriteLine ( "first" ) ;
return set.x ;
}
}
public class Test
{
public static void Main( )
{
new ObjectSet< string> ( ) .Find ( 0 ) ;
Console.ReadKey ( ) ;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uTGlucS5FeHByZXNzaW9uczsKCm5hbWVzcGFjZSBYCnsKICAgIHB1YmxpYyBjbGFzcyBPYmplY3RTZXQ8VD4KICAgIHsKICAgICAgICBwdWJsaWMgVFtdIHg7CiAgICB9CgogICAgcHVibGljIHN0YXRpYyBjbGFzcyBPYmplY3RDb250ZXh0RXh0ZW5zaW9ucwogICAgewoKICAgICAgICBwdWJsaWMgc3RhdGljIFRbXSBGaW5kPFQ+KHRoaXMgT2JqZWN0U2V0PFQ+IHNldCwgaW50IGlkLCBwYXJhbXMgc3RyaW5nW10gaW5jbHVkZXMpIHdoZXJlIFQgOiBjbGFzcwogICAgICAgIHsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoInNlY29uZCIpOwogICAgICAgICAgICByZXR1cm4gc2V0Lng7CiAgICAgICAgfQoKICAgICAgICBwdWJsaWMgc3RhdGljIFRbXSBGaW5kPFQ+KHRoaXMgT2JqZWN0U2V0PFQ+IHNldCwgaW50IGlkLCBwYXJhbXMgRXhwcmVzc2lvbjxGdW5jPFQsIG9iamVjdD4+W10gaW5jbHVkZXMpIHdoZXJlIFQgOiBjbGFzcwogICAgICAgIHsKICAgICAgICAgICAgQ29uc29sZS5Xcml0ZUxpbmUoImZpcnN0Iik7CiAgICAgICAgICAgIHJldHVybiBzZXQueDsKICAgICAgICB9CgogICAKICAgIH0KCiAgICBwdWJsaWMgY2xhc3MgVGVzdAogICAgewogICAgICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKICAgICAgICB7CiAgICAgICAgICAgIG5ldyBPYmplY3RTZXQ8c3RyaW5nPigpLkZpbmQoMCk7CiAgICAgICAgICAgIENvbnNvbGUuUmVhZEtleSgpOwogICAgICAgIH0KICAgIH0KfQ==
compilation info
prog.cs(33,37): error CS0121: The call is ambiguous between the following methods or properties: `X.ObjectContextExtensions.Find<string>(this X.ObjectSet<string>, int, params string[])' and `X.ObjectContextExtensions.Find<string>(this X.ObjectSet<string>, int, params System.Linq.Expressions.Expression<System.Func<string,object>>[])'
prog.cs(14,27): (Location of the symbol related to previous error)
prog.cs(20,27): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout