Skip to content

Commit

Permalink
Merge pull request #7169 from dotnet/merges/master-to-feature/nullness
Browse files Browse the repository at this point in the history
Merge master to feature/nullness
  • Loading branch information
KevinRansom authored Jul 10, 2019
2 parents eb605a1 + 0a90022 commit bcd68dd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19353.19">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19359.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>733f8297b68dd824044a77d955e62305b9dc43d5</Sha>
<Sha>ef3834feb8615429a58808cdcf9ad9284d767654</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19353.19",
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19359.1",
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
}
}
7 changes: 6 additions & 1 deletion src/fsharp/FSharp.Core/Linq.fs
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,12 @@ module LeafExpressionConverter =
Expression.Lambda(dty, bodyP, vsP) |> asExpr

| Patterns.NewTuple args ->
let tupTy = args |> List.map (fun arg -> arg.Type) |> Array.ofList |> Reflection.FSharpType.MakeTupleType
let tupTy =
let argTypes = args |> List.map (fun arg -> arg.Type) |> Array.ofList
if inp.Type.IsValueType then
Reflection.FSharpType.MakeStructTupleType(inp.Type.Assembly, argTypes)
else
Reflection.FSharpType.MakeTupleType(argTypes)
let argsP = ConvExprsToLinq env args
let rec build ty (argsP: Expression[]) =
match Reflection.FSharpValue.PreComputeTupleConstructorInfo ty with
Expand Down
18 changes: 18 additions & 0 deletions tests/fsharp/core/queriesLeafExpressionConvert/test.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,24 @@ module LeafExpressionEvaluationTests =
checkEval "2ver9ewrx" (<@ (1,2,3,4,5,6,7,8,9,10) @>) (1,2,3,4,5,6,7,8,9,10)
checkEval "2ver9ewrc" (<@ (1,2,3,4,5,6,7,8,9,10,11) @>) (1,2,3,4,5,6,7,8,9,10,11)
checkEval "2ver9ewrv" (<@ (1,2,3,4,5,6,7,8,9,10,11,12) @>) (1,2,3,4,5,6,7,8,9,10,11,12)


check "2ver9ewrsf" (let v2 = struct(3,4) in Eval <@ v2 @>) struct(3,4)

check "2ver9ewrsg" (let v2 = struct(3,4) in Eval <@ struct(v2,v2) @>) struct(struct(3,4),struct(3,4))

checkEval "2ver9ewrst" (<@ struct(1,2) @>) struct(1,2)
checkEval "2ver9ewvsk" (<@ struct(1,2,3) @>) struct(1,2,3)
checkEval "2ver9ewrsh" (<@ struct(1,2,3,4) @>) struct(1,2,3,4)
checkEval "2ver9ewrsj" (<@ struct(1,2,3,4,5) @>) struct(1,2,3,4,5)
checkEval "2ver9ewrsk" (<@ struct(1,2,3,4,5,6) @>) struct(1,2,3,4,5,6)
checkEval "2ver9ewrsl" (<@ struct(1,2,3,4,5,6,7) @>) struct(1,2,3,4,5,6,7)
checkEval "2ver9ewrsa" (<@ struct(1,2,3,4,5,6,7,8) @>) struct(1,2,3,4,5,6,7,8)
checkEval "2ver9ewrss" (<@ struct(1,2,3,4,5,6,7,8,9) @>) struct(1,2,3,4,5,6,7,8,9)
checkEval "2ver9ewrsx" (<@ struct(1,2,3,4,5,6,7,8,9,10) @>) struct(1,2,3,4,5,6,7,8,9,10)
checkEval "2ver9ewrsc" (<@ struct(1,2,3,4,5,6,7,8,9,10,11) @>) struct(1,2,3,4,5,6,7,8,9,10,11)
checkEval "2ver9ewrsv" (<@ struct(1,2,3,4,5,6,7,8,9,10,11,12) @>) struct(1,2,3,4,5,6,7,8,9,10,11,12)

checkEval "2ver9ewrb" (<@ System.DateTime.Now.DayOfWeek @>) System.DateTime.Now.DayOfWeek
checkEval "2ver9ewrn" (<@ Checked.(+) 1 1 @>) 2
checkEval "2ver9ewrm" (<@ Checked.(-) 1 1 @>) 0
Expand Down

0 comments on commit bcd68dd

Please sign in to comment.