We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23ea207 commit 97c236eCopy full SHA for 97c236e
src/fsharp/FSharp.Core/Linq.fs
@@ -744,7 +744,12 @@ module LeafExpressionConverter =
744
Expression.Lambda(dty, bodyP, vsP) |> asExpr
745
746
| Patterns.NewTuple args ->
747
- let tupTy = args |> List.map (fun arg -> arg.Type) |> Array.ofList |> Reflection.FSharpType.MakeTupleType
+ let tupTy =
748
+ let argTypes = args |> List.map (fun arg -> arg.Type) |> Array.ofList
749
+ if inp.Type.IsValueType then
750
+ Reflection.FSharpType.MakeStructTupleType(inp.Type.Assembly, argTypes)
751
+ else
752
+ Reflection.FSharpType.MakeTupleType(argTypes)
753
let argsP = ConvExprsToLinq env args
754
let rec build ty (argsP: Expression[]) =
755
match Reflection.FSharpValue.PreComputeTupleConstructorInfo ty with
0 commit comments