Skip to content

Commit e172511

Browse files
authored
Merge branch 'main' into copilot/fix-fsharp-optional-parameter-highlighting
2 parents 618ccd7 + ba99dd5 commit e172511

File tree

11 files changed

+1529
-44
lines changed

11 files changed

+1529
-44
lines changed

eng/Version.Details.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This file should be imported by eng/Versions.props
2727
<MicrosoftCodeAnalysisFeaturesPackageVersion>5.0.0-2.25480.7</MicrosoftCodeAnalysisFeaturesPackageVersion>
2828
<MicrosoftVisualStudioLanguageServicesPackageVersion>5.0.0-2.25480.7</MicrosoftVisualStudioLanguageServicesPackageVersion>
2929
<!-- dotnet/arcade dependencies -->
30-
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25612.6</MicrosoftDotNetArcadeSdkPackageVersion>
30+
<MicrosoftDotNetArcadeSdkPackageVersion>11.0.0-beta.25615.1</MicrosoftDotNetArcadeSdkPackageVersion>
3131
<!-- _git/dotnet-optimization dependencies -->
3232
<optimizationlinuxarm64MIBCRuntimePackageVersion>1.0.0-prerelease.25502.1</optimizationlinuxarm64MIBCRuntimePackageVersion>
3333
<optimizationlinuxx64MIBCRuntimePackageVersion>1.0.0-prerelease.25502.1</optimizationlinuxx64MIBCRuntimePackageVersion>

eng/Version.Details.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
</Dependency>
7777
</ProductDependencies>
7878
<ToolsetDependencies>
79-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25612.6">
79+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="11.0.0-beta.25615.1">
8080
<Uri>https://github.com/dotnet/arcade</Uri>
81-
<Sha>8adf115288fa51feaa30d063b946478054c7f7b4</Sha>
81+
<Sha>059959b98fc4350c619399ae2bf4c7b854779ecf</Sha>
8282
</Dependency>
8383
<Dependency Name="optimization.windows_nt-x64.MIBC.Runtime" Version="1.0.0-prerelease.25502.1">
8484
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"perl": "5.38.2.2"
2323
},
2424
"msbuild-sdks": {
25-
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25612.6",
25+
"Microsoft.DotNet.Arcade.Sdk": "11.0.0-beta.25615.1",
2626
"Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.23255.2"
2727
}
2828
}

src/Compiler/Interactive/fsi.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2131,7 +2131,8 @@ type internal FsiDynamicCompiler
21312131
if tcConfig.printAst then
21322132
for input in declaredImpls do
21332133
fprintfn fsiConsoleOutput.Out "AST:"
2134-
fprintfn fsiConsoleOutput.Out "%+A" input
2134+
let layout = DebugPrint.implFileL input
2135+
fprintfn fsiConsoleOutput.Out "%s" (LayoutRender.showL layout)
21352136
#endif
21362137

21372138
diagnosticsLogger.AbortOnError(fsiConsoleOutput)

src/Compiler/TypedTree/TypedTreeOps.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11225,13 +11225,16 @@ let mkOptimizedRangeLoop (g: TcGlobals) (mBody, mFor, mIn, spInWhile) (rangeTy,
1122511225
| RangeCount.PossiblyOversize calc ->
1122611226
calc (fun count wouldOvf ->
1122711227
buildLoop count (fun mkBody ->
11228+
// mkBody creates expressions that may contain lambdas with unique stamps.
11229+
// We need to copy the expression for the second branch to avoid duplicate type names.
11230+
let mkBodyCopied idxVar loopVar = copyExpr g CloneAll (mkBody idxVar loopVar)
1122811231
mkCond
1122911232
DebugPointAtBinding.NoneAtInvisible
1123011233
mIn
1123111234
g.unit_ty
1123211235
wouldOvf
1123311236
(mkCountUpInclusive mkBody (tyOfExpr g count))
11234-
(mkCompGenLetIn mIn (nameof count) (tyOfExpr g count) count (fun (_, count) -> mkCountUpExclusive mkBody count))))
11237+
(mkCompGenLetIn mIn (nameof count) (tyOfExpr g count) count (fun (_, count) -> mkCountUpExclusive mkBodyCopied count))))
1123511238
)
1123611239

1123711240
let mkDebugPoint m expr =

tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let f0 f = [|for n in 1..10 do f (); yield n|]
1+
let f0 f = [|for n in 1..10 do f (); yield n|]
22
let f00 f g = [|for n in 1..10 do f (); g (); yield n|]
33
let f000 f = [|for n in 1..10 do f (); yield n; yield n + 1|]
44
let f0000 () = [|for n in 1..10 do yield n|]
@@ -42,3 +42,8 @@ let f29 f g = [|let y = f () in let z = g () in for x in 1..2..10 -> x + y + z|]
4242
let f30 f g = [|let y = f () in g (); for x in 1..2..10 -> x + y|]
4343
let f31 f g = [|f (); g (); for x in 1..2..10 -> x|]
4444
let f32 f g = [|f (); let y = g () in for x in 1..2..10 -> x + y|]
45+
46+
// https://github.com/dotnet/fsharp/issues/19156
47+
let f33 (start : int) (finish : int) f = [|for _ in start..finish -> id id ()|]
48+
let f34 (start : int64) (finish : int64) f = [|for _ in start..finish -> id id ()|]
49+
let f35 (start : uint64) (finish : uint64) f = [|for _ in start..finish -> id id ()|]

tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeArrays.fs.il.bsl

Lines changed: 762 additions & 0 deletions
Large diffs are not rendered by default.

tests/FSharp.Compiler.ComponentTests/EmittedIL/ComputedCollections/ForNInRangeLists.fs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let f0 f = [for n in 1..10 do f (); yield n]
1+
let f0 f = [for n in 1..10 do f (); yield n]
22
let f00 f g = [|for n in 1..10 do f (); g (); yield n|]
33
let f000 f = [for n in 1..10 do f (); yield n; yield n + 1]
44
let f0000 () = [for n in 1..10 do yield n]
@@ -42,3 +42,8 @@ let f29 f g = [let y = f () in let z = g () in for x in 1..2..10 -> x + y + z]
4242
let f30 f g = [let y = f () in g (); for x in 1..2..10 -> x + y]
4343
let f31 f g = [f (); g (); for x in 1..2..10 -> x]
4444
let f32 f g = [f (); let y = g () in for x in 1..2..10 -> x + y]
45+
46+
// https://github.com/dotnet/fsharp/issues/19156
47+
let f33 (start : int) (finish : int) f = [for _ in start..finish -> id id ()]
48+
let f34 (start : int64) (finish : int64) f = [for _ in start..finish -> id id ()]
49+
let f35 (start : uint64) (finish : uint64) f = [for _ in start..finish -> id id ()]

0 commit comments

Comments
 (0)