Skip to content

Commit bcd68dd

Browse files
authored
Merge pull request #7169 from dotnet/merges/master-to-feature/nullness
Merge master to feature/nullness
2 parents eb605a1 + 0a90022 commit bcd68dd

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<ProductDependencies>
44
</ProductDependencies>
55
<ToolsetDependencies>
6-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19353.19">
6+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19359.1">
77
<Uri>https://github.com/dotnet/arcade</Uri>
8-
<Sha>733f8297b68dd824044a77d955e62305b9dc43d5</Sha>
8+
<Sha>ef3834feb8615429a58808cdcf9ad9284d767654</Sha>
99
</Dependency>
1010
</ToolsetDependencies>
1111
</Dependencies>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"msbuild-sdks": {
13-
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19353.19",
13+
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19359.1",
1414
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2"
1515
}
1616
}

src/fsharp/FSharp.Core/Linq.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,12 @@ module LeafExpressionConverter =
744744
Expression.Lambda(dty, bodyP, vsP) |> asExpr
745745

746746
| Patterns.NewTuple args ->
747-
let tupTy = args |> List.map (fun arg -> arg.Type) |> Array.ofList |> Reflection.FSharpType.MakeTupleType
747+
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)
748753
let argsP = ConvExprsToLinq env args
749754
let rec build ty (argsP: Expression[]) =
750755
match Reflection.FSharpValue.PreComputeTupleConstructorInfo ty with

tests/fsharp/core/queriesLeafExpressionConvert/test.fsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,24 @@ module LeafExpressionEvaluationTests =
146146
checkEval "2ver9ewrx" (<@ (1,2,3,4,5,6,7,8,9,10) @>) (1,2,3,4,5,6,7,8,9,10)
147147
checkEval "2ver9ewrc" (<@ (1,2,3,4,5,6,7,8,9,10,11) @>) (1,2,3,4,5,6,7,8,9,10,11)
148148
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)
149+
150+
151+
check "2ver9ewrsf" (let v2 = struct(3,4) in Eval <@ v2 @>) struct(3,4)
152+
153+
check "2ver9ewrsg" (let v2 = struct(3,4) in Eval <@ struct(v2,v2) @>) struct(struct(3,4),struct(3,4))
154+
155+
checkEval "2ver9ewrst" (<@ struct(1,2) @>) struct(1,2)
156+
checkEval "2ver9ewvsk" (<@ struct(1,2,3) @>) struct(1,2,3)
157+
checkEval "2ver9ewrsh" (<@ struct(1,2,3,4) @>) struct(1,2,3,4)
158+
checkEval "2ver9ewrsj" (<@ struct(1,2,3,4,5) @>) struct(1,2,3,4,5)
159+
checkEval "2ver9ewrsk" (<@ struct(1,2,3,4,5,6) @>) struct(1,2,3,4,5,6)
160+
checkEval "2ver9ewrsl" (<@ struct(1,2,3,4,5,6,7) @>) struct(1,2,3,4,5,6,7)
161+
checkEval "2ver9ewrsa" (<@ struct(1,2,3,4,5,6,7,8) @>) struct(1,2,3,4,5,6,7,8)
162+
checkEval "2ver9ewrss" (<@ struct(1,2,3,4,5,6,7,8,9) @>) struct(1,2,3,4,5,6,7,8,9)
163+
checkEval "2ver9ewrsx" (<@ struct(1,2,3,4,5,6,7,8,9,10) @>) struct(1,2,3,4,5,6,7,8,9,10)
164+
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)
165+
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)
166+
149167
checkEval "2ver9ewrb" (<@ System.DateTime.Now.DayOfWeek @>) System.DateTime.Now.DayOfWeek
150168
checkEval "2ver9ewrn" (<@ Checked.(+) 1 1 @>) 2
151169
checkEval "2ver9ewrm" (<@ Checked.(-) 1 1 @>) 0

0 commit comments

Comments
 (0)