A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dotnet/fsharp/issues/6515 below:

LeafExpressionConverter ignores ValueTuple and assumes System.Tuple · Issue #6515 · dotnet/fsharp · GitHub

val it : Expression =
  new Tuple`2(1, 1) {Arguments = seq [1; 1];
                     CanReduce = false;
                     Constructor = Void .ctor(Int32, Int32);
                     Members = null;
                     NodeType = New;
                     Type = System.Tuple`2[System.Int32,System.Int32];}
let f (struct(a,b)) = (a,b)
FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.QuotationToExpression(<@f struct(1,1)@>)
> System.ArgumentException: Expression of type 'System.Tuple`2[System.Int32,System.Int32]' cannot be used for parameter of type 'System.ValueTuple`2[System.Int32,System.Int32]' of method 'System.Tuple`2[System.Int32,System.Int32] f[Int32,Int32](System.ValueTuple`2[System.Int32,System.Int32])'
   at System.Linq.Expressions.Expression.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arg, ParameterInfo pi)
   at System.Linq.Expressions.Expression.ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ReadOnlyCollection`1& arguments)
   at System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable`1 arguments)
   at Microsoft.FSharp.Linq.RuntimeHelpers.LeafExpressionConverter.ConvExprToLinqInContext(ConvEnv env, FSharpExpr inp)
   at <StartupCode$FSI_0019>.$FSI_0019.main@()
Stopped due to error

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3