Skip to content

Commit 7f44b41

Browse files
T-Grovzarytovskiipsfinaki0101KevinRansom
authored
[automated] Merge branch 'release/dev17.14' => 'release/dev18.0' (#18409)
* Versioning for 17.14 and 9.0.300 (#18222) * more code flow * Update fantomas to 7.0.1 (#18400) * Update fantomas * Update fantomas - vsintegration * Investigate.nuget (#18393) * initial * testing * temp * Fantomas, readme * temp * nowarn quotes for fantomas * tests * Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20250320.3 (#18398) Microsoft.SourceBuild.Intermediate.source-build-reference-packages From Version 9.0.0-alpha.1.25163.3 -> To Version 9.0.0-alpha.1.25170.3 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> * Fantomas (#18404) * Fix false negative [<TailCall>] warning (#18399) * Update dependencies from https://github.com/dotnet/msbuild build 20250324.8 (#18405) Microsoft.SourceBuild.Intermediate.msbuild , Microsoft.Build , Microsoft.Build.Framework , Microsoft.Build.Tasks.Core , Microsoft.Build.Utilities.Core From Version 17.13.21-preview-25169-06 -> To Version 17.13.22-preview-25174-08 Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com> * Fix GC test that is flaky on Linux (#18408) * update runtime to 9.0.3 (#18406) --------- Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Petr Pokorny <petrpokorny@microsoft.com> Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: dawe <dawedawe@posteo.de> Co-authored-by: Jakub Majocha <1760221+majocha@users.noreply.github.com>
2 parents 713b113 + 6f34f38 commit 7f44b41

File tree

133 files changed

+1001
-1231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+1001
-1231
lines changed

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"rollForward": true
4646
},
4747
"fantomas": {
48-
"version": "6.2.3",
48+
"version": "7.0.1",
4949
"commands": [
5050
"fantomas"
5151
],

.config/service-branch-merge.json

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"MergeToBranch": "main",
66
"ExtraSwitches": "-QuietComments"
77
},
8+
"release/dev17.14": {
9+
"MergeToBranch": "release/dev18.0",
10+
"ExtraSwitches": "-QuietComments"
11+
},
812
"main": {
913
"MergeToBranch": "release/dev17.14",
1014
"ExtraSwitches": "-QuietComments"

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,6 @@ positive.exe
134134
/tests/FSharp.Compiler.ComponentTests/FSharpChecker/StandardOutput.txt
135135

136136
# ilverify baseline result files
137-
*.bsl.actual
137+
*.bsl.actual
138+
/src/FSharp.DependencyManager.Nuget/StandardError.txt
139+
/src/FSharp.DependencyManager.Nuget/StandardOutput.txt

NuGet.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<clear />
99
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
1010
<!-- Begin: Package sources from DotNet-msbuild-Trusted -->
11-
<add key="darc-pub-DotNet-msbuild-Trusted-0586a3f" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-0586a3f9/nuget/v3/index.json" />
11+
<add key="darc-pub-DotNet-msbuild-Trusted-0ca03f8" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-DotNet-msbuild-Trusted-0ca03f84/nuget/v3/index.json" />
1212
<!-- End: Package sources from DotNet-msbuild-Trusted -->
1313
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
1414
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />

docs/release-notes/.FSharp.Compiler.Service/9.0.300.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### Fixed
2+
* Fix missing TailCall warning in TOp.IntegerForLoop ([PR #18399](https://github.com/dotnet/fsharp/pull/18399))
23
* Fix classification of `nameof` in `nameof<'T>`, `match … with nameof ident -> …`. ([Issue #10026](https://github.com/dotnet/fsharp/issues/10026), [PR #18300](https://github.com/dotnet/fsharp/pull/18300))
34
* Fix Realsig+ generates nested closures with incorrect Generic ([Issue #17797](https://github.com/dotnet/fsharp/issues/17797), [PR #17877](https://github.com/dotnet/fsharp/pull/17877))
45
* Fix optimizer internal error for records with static fields ([Issue #18165](https://github.com/dotnet/fsharp/issues/18165), [PR #18280](https://github.com/dotnet/fsharp/pull/18280))
@@ -18,6 +19,7 @@
1819
* Miscellanous parentheses analyzer fixes. ([PR #18350](https://github.com/dotnet/fsharp/pull/18350))
1920
* Fix duplicate parse error reporting for GetBackgroundCheckResultsForFileInProject ([Issue #18379](https://github.com/dotnet/fsharp/issues/18379) [PR #18380](https://github.com/dotnet/fsharp/pull/18380))
2021
* Fix MethodDefNotFound when compiling code invoking delegate with option parameter ([Issue #5171](https://github.com/dotnet/fsharp/issues/5171), [PR #18385](https://github.com/dotnet/fsharp/pull/18385))
22+
* Fix #r nuget ..." downloads unneeded packages ([Issue #18231](https://github.com/dotnet/fsharp/issues/18231), [PR #18393](https://github.com/dotnet/fsharp/pull/18393))
2123

2224
### Added
2325
* Added missing type constraints in FCS. ([PR #18241](https://github.com/dotnet/fsharp/pull/18241))
@@ -30,7 +32,6 @@
3032

3133

3234
### Changed
33-
3435
* FSharpCheckFileResults.ProjectContext.ProjectOptions will not be available when using the experimental Transparent Compiler feature. ([PR #18205](https://github.com/dotnet/fsharp/pull/18205))
3536
* Update `Obsolete` attribute checking to account for `DiagnosticId` and `UrlFormat` properties. ([PR #18224](https://github.com/dotnet/fsharp/pull/18224))
3637
* Remove `Cancellable.UsingToken` from tests ([PR #18276](https://github.com/dotnet/fsharp/pull/18276))

docs/release-notes/.VisualStudio/17.14.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### Fixed
2+
* Fix #r nuget ..." downloads unneeded packages ([Issue #18231](https://github.com/dotnet/fsharp/issues/18231), [PR #18393](https://github.com/dotnet/fsharp/pull/18393))
23

34
### Added
45
* Add a switch to determine whether to generate a default implementation body for overridden method when completing. [PR #18341](https://github.com/dotnet/fsharp/pull/18341)

eng/Version.Details.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Dependencies>
33
<ProductDependencies>
4-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.25163.3">
4+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.25170.3">
55
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
6-
<Sha>27dfbb8d8a0344d845948109a5a1f0d9c7f17fa9</Sha>
6+
<Sha>6968f7059f4418e985febe704a3b1320f9e5887d</Sha>
77
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
88
</Dependency>
99
<!-- Intermediate is necessary for source build. -->
10-
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.13.21-preview-25169-06">
10+
<Dependency Name="Microsoft.SourceBuild.Intermediate.msbuild" Version="17.13.22-preview-25174-08">
1111
<Uri>https://github.com/dotnet/msbuild</Uri>
12-
<Sha>0586a3f904d83c5f77f8407661429caadcbdc5f9</Sha>
12+
<Sha>0ca03f84b7848ce9d7d3e5d1f68c5e090efa4f30</Sha>
1313
<SourceBuild RepoName="msbuild" ManagedOnly="true" />
1414
</Dependency>
15-
<Dependency Name="Microsoft.Build" Version="17.13.21">
15+
<Dependency Name="Microsoft.Build" Version="17.13.22">
1616
<Uri>https://github.com/dotnet/msbuild</Uri>
17-
<Sha>0586a3f904d83c5f77f8407661429caadcbdc5f9</Sha>
17+
<Sha>0ca03f84b7848ce9d7d3e5d1f68c5e090efa4f30</Sha>
1818
</Dependency>
19-
<Dependency Name="Microsoft.Build.Framework" Version="17.13.21">
19+
<Dependency Name="Microsoft.Build.Framework" Version="17.13.22">
2020
<Uri>https://github.com/dotnet/msbuild</Uri>
21-
<Sha>0586a3f904d83c5f77f8407661429caadcbdc5f9</Sha>
21+
<Sha>0ca03f84b7848ce9d7d3e5d1f68c5e090efa4f30</Sha>
2222
</Dependency>
23-
<Dependency Name="Microsoft.Build.Tasks.Core" Version="17.13.21">
23+
<Dependency Name="Microsoft.Build.Tasks.Core" Version="17.13.22">
2424
<Uri>https://github.com/dotnet/msbuild</Uri>
25-
<Sha>0586a3f904d83c5f77f8407661429caadcbdc5f9</Sha>
25+
<Sha>0ca03f84b7848ce9d7d3e5d1f68c5e090efa4f30</Sha>
2626
</Dependency>
27-
<Dependency Name="Microsoft.Build.Utilities.Core" Version="17.13.21">
27+
<Dependency Name="Microsoft.Build.Utilities.Core" Version="17.13.22">
2828
<Uri>https://github.com/dotnet/msbuild</Uri>
29-
<Sha>0586a3f904d83c5f77f8407661429caadcbdc5f9</Sha>
29+
<Sha>0ca03f84b7848ce9d7d3e5d1f68c5e090efa4f30</Sha>
3030
</Dependency>
3131
<Dependency Name="System.Reflection.Metadata" Version="8.0.0">
3232
<Uri>https://github.com/dotnet/runtime</Uri>

eng/Versions.props

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<MicrosoftVisualStudioShellPackagesVersion>17.10.40152</MicrosoftVisualStudioShellPackagesVersion>
9595
<VisualStudioProjectSystemPackagesVersion>17.10.526-pre-g1b474069f5</VisualStudioProjectSystemPackagesVersion>
9696
<MicrosoftVisualStudioThreadingPackagesVersion>17.10.41</MicrosoftVisualStudioThreadingPackagesVersion>
97-
<MicrosoftBuildVersion>17.13.21</MicrosoftBuildVersion>
97+
<MicrosoftBuildVersion>17.13.22</MicrosoftBuildVersion>
9898
<!-- Roslyn packages -->
9999
<MicrosoftCodeAnalysisEditorFeaturesVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesVersion>
100100
<MicrosoftCodeAnalysisEditorFeaturesTextVersion>$(RoslynVersion)</MicrosoftCodeAnalysisEditorFeaturesTextVersion>
@@ -130,9 +130,9 @@
130130
<MicrosoftVisualStudioShellImmutable150Version>15.0.25123-Dev15Preview</MicrosoftVisualStudioShellImmutable150Version>
131131
<!-- -->
132132
<!-- Microsoft Build packages -->
133-
<MicrosoftBuildFrameworkVersion>17.13.21</MicrosoftBuildFrameworkVersion>
134-
<MicrosoftBuildTasksCoreVersion>17.13.21</MicrosoftBuildTasksCoreVersion>
135-
<MicrosoftBuildUtilitiesCoreVersion>17.13.21</MicrosoftBuildUtilitiesCoreVersion>
133+
<MicrosoftBuildFrameworkVersion>17.13.22</MicrosoftBuildFrameworkVersion>
134+
<MicrosoftBuildTasksCoreVersion>17.13.22</MicrosoftBuildTasksCoreVersion>
135+
<MicrosoftBuildUtilitiesCoreVersion>17.13.22</MicrosoftBuildUtilitiesCoreVersion>
136136
<!-- -->
137137
<!-- Visual Studio Editor packages -->
138138
<MicrosoftVisualStudioCoreUtilityVersion>$(VisualStudioEditorPackagesVersion)</MicrosoftVisualStudioCoreUtilityVersion>

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"sdk": {
3-
"version": "9.0.200",
3+
"version": "9.0.202",
44
"allowPrerelease": true
55
},
66
"tools": {
7-
"dotnet": "9.0.200",
7+
"dotnet": "9.0.202",
88
"vs": {
99
"version": "17.8",
1010
"components": [

src/Compiler/AbstractIL/ilnativeres.fs

+28-28
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ type CvtResFile() =
8383
pAdditional.DataSize <- cbData
8484
pAdditional.pstringType <- CvtResFile.ReadStringOrID reader
8585
pAdditional.pstringName <- CvtResFile.ReadStringOrID reader
86-
stream.Position <- stream.Position + 3L &&& ~~~ 3L
86+
stream.Position <- stream.Position + 3L &&& ~~~3L
8787
pAdditional.DataVersion <- reader.ReadUInt32()
8888
pAdditional.MemoryFlags <- reader.ReadUInt16()
8989
pAdditional.LanguageId <- reader.ReadUInt16()
9090
pAdditional.Version <- reader.ReadUInt32()
9191
pAdditional.Characteristics <- reader.ReadUInt32()
9292
pAdditional.data <- Array.zeroCreate (int pAdditional.DataSize)
9393
reader.Read(pAdditional.data, 0, pAdditional.data.Length) |> ignore<int>
94-
stream.Position <- stream.Position + 3L &&& ~~~ 3L
94+
stream.Position <- stream.Position + 3L &&& ~~~3L
9595

9696
if
9797
pAdditional.pstringType.theString = Unchecked.defaultof<_>
@@ -174,6 +174,7 @@ type SectionCharacteristics =
174174
type ResourceSection() =
175175
new(sectionBytes: byte[], relocations: uint32[]) as this =
176176
(ResourceSection())
177+
177178
then
178179
Debug.Assert(sectionBytes :> obj <> Unchecked.defaultof<_>)
179180
Debug.Assert(relocations :> obj <> Unchecked.defaultof<_>)
@@ -374,13 +375,8 @@ type VersionHelper() =
374375
///
375376
/// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
376377
static member private TryParse
377-
(
378-
s: string,
379-
allowWildcard: bool,
380-
maxValue: uint16,
381-
allowPartialParse: bool,
382-
[<Out>] version: byref<Version>
383-
) =
378+
(s: string, allowWildcard: bool, maxValue: uint16, allowPartialParse: bool, [<Out>] version: byref<Version>)
379+
=
384380
Debug.Assert(not allowWildcard || maxValue < UInt16.MaxValue)
385381

386382
if String.IsNullOrWhiteSpace s then
@@ -520,20 +516,24 @@ type VersionResourceSerializer() =
520516

521517
member val private _isDll = Unchecked.defaultof<bool> with get, set
522518

523-
new(isDll: bool,
524-
comments: string,
525-
companyName: string,
526-
fileDescription: string,
527-
fileVersion: string,
528-
internalName: string,
529-
legalCopyright: string,
530-
legalTrademark: string,
531-
originalFileName: string,
532-
productName: string,
533-
productVersion: string,
534-
assemblyVersion: Version) as this =
519+
new
520+
(
521+
isDll: bool,
522+
comments: string,
523+
companyName: string,
524+
fileDescription: string,
525+
fileVersion: string,
526+
internalName: string,
527+
legalCopyright: string,
528+
legalTrademark: string,
529+
originalFileName: string,
530+
productName: string,
531+
productVersion: string,
532+
assemblyVersion: Version
533+
) as this =
535534

536535
VersionResourceSerializer()
536+
537537
then
538538
this._isDll <- isDll
539539
this._commentsContents <- comments
@@ -620,7 +620,7 @@ type VersionResourceSerializer() =
620620
static member private PadKeyLen(cb: int) =
621621
VersionResourceSerializer.PadToDword(cb + 3 * sizeof<WORD>) - 3 * sizeof<WORD>
622622

623-
static member private PadToDword(cb: int) = cb + 3 &&& ~~~ 3
623+
static member private PadToDword(cb: int) = cb + 3 &&& ~~~3
624624

625625
static member val private HDRSIZE = (int (3 * sizeof<uint16>)) with get, set
626626

@@ -667,7 +667,7 @@ type VersionResourceSerializer() =
667667
let mutable (sum: int) = 0
668668

669669
for verString in this.GetVerStrings() do
670-
sum <- sum + 3 &&& ~~~ 3
670+
sum <- sum + 3 &&& ~~~3
671671
sum <- sum + VersionResourceSerializer.SizeofVerString(verString.Key, verString.Value)
672672

673673
sum
@@ -801,7 +801,7 @@ type VersionResourceSerializer() =
801801

802802
for entry in this.GetVerStrings() do
803803
let mutable writerPos = writer.BaseStream.Position
804-
writer.Write(Array.zeroCreate (int ((writerPos + 3L) &&& ~~~ 3L - writerPos)): byte[])
804+
writer.Write(Array.zeroCreate (int ((writerPos + 3L) &&& ~~~3L - writerPos)): byte[])
805805
Debug.Assert(entry.Value <> Unchecked.defaultof<_>)
806806
VersionResourceSerializer.WriteVersionString(entry, writer)
807807

@@ -861,7 +861,7 @@ type Win32ResourceConversions() =
861861
let mutable (i: uint16) = 0us
862862

863863
while (i < count) do
864-
resStream.Position <- resStream.Position + 3L &&& ~~~ 3L
864+
resStream.Position <- resStream.Position + 3L &&& ~~~3L
865865
resWriter.Write iconDirEntries[(int i)].dwBytesInRes
866866
resWriter.Write 0x00000020u
867867
resWriter.Write 0xFFFFus
@@ -878,7 +878,7 @@ type Win32ResourceConversions() =
878878
i <- i + 1us
879879

880880
let mutable (RT_GROUP_ICON: WORD) = (RT_ICON + 11us)
881-
resStream.Position <- resStream.Position + 3L &&& ~~~ 3L
881+
resStream.Position <- resStream.Position + 3L &&& ~~~3L
882882
resWriter.Write(uint32 (3 * sizeof<WORD> + int count * 14))
883883
resWriter.Write 0x00000020u
884884
resWriter.Write 0xFFFFus
@@ -933,7 +933,7 @@ type Win32ResourceConversions() =
933933
let comments = (defaultArg comments) Unchecked.defaultof<_>
934934
let companyName = (defaultArg companyName) Unchecked.defaultof<_>
935935
let mutable resWriter = new BinaryWriter(resStream, Encoding.Unicode)
936-
resStream.Position <- resStream.Position + 3L &&& ~~~ 3L
936+
resStream.Position <- resStream.Position + 3L &&& ~~~3L
937937
let mutable (RT_VERSION: DWORD) = 16u
938938

939939
let mutable ver =
@@ -970,7 +970,7 @@ type Win32ResourceConversions() =
970970
Debug.Assert(resStream.Position - startPos = int64 dataSize + int64 headerSize)
971971

972972
static member AppendManifestToResourceStream(resStream: Stream, manifestStream: Stream, isDll: bool) =
973-
resStream.Position <- resStream.Position + 3L &&& ~~~ 3L (* ERROR UnknownPrefixOperator "~" *)
973+
resStream.Position <- resStream.Position + 3L &&& ~~~3L (* ERROR UnknownPrefixOperator "~" *)
974974
let mutable (RT_MANIFEST: WORD) = 24us
975975
let mutable resWriter = new BinaryWriter(resStream)
976976
resWriter.Write(uint32 manifestStream.Length)

src/Compiler/AbstractIL/ilread.fs

+2-10
Original file line numberDiff line numberDiff line change
@@ -4180,16 +4180,8 @@ and seekReadTopExportedTypes (ctxt: ILMetadataReader) =
41804180

41814181
// Note, pectxtEager and pevEager must not be captured by the results of this function
41824182
let openMetadataReader
4183-
(
4184-
fileName,
4185-
mdfile: BinaryFile,
4186-
metadataPhysLoc,
4187-
peinfo,
4188-
pectxtEager: PEReader,
4189-
pevEager,
4190-
pectxtCaptured,
4191-
reduceMemoryUsage
4192-
) =
4183+
(fileName, mdfile: BinaryFile, metadataPhysLoc, peinfo, pectxtEager: PEReader, pevEager, pectxtCaptured, reduceMemoryUsage)
4184+
=
41934185
let mdv = mdfile.GetView()
41944186
let magic = seekReadUInt16AsInt32 mdv metadataPhysLoc
41954187

src/Compiler/AbstractIL/ilreflect.fs

+5-8
Original file line numberDiff line numberDiff line change
@@ -290,10 +290,7 @@ type OpCode with
290290
member opcode.RefEmitName =
291291
match opcode.Name with
292292
| null -> ""
293-
| name ->
294-
(string (Char.ToUpper(name[0])) + name[1..])
295-
.Replace(".", "_")
296-
.Replace("_i4", "_I4")
293+
| name -> (string (Char.ToUpper(name[0])) + name[1..]).Replace(".", "_").Replace("_i4", "_I4")
297294

298295
type ILGenerator with
299296

@@ -713,7 +710,7 @@ let rec convTypeSpec cenv emEnv preferCreated (tspec: ILTypeSpec) =
713710

714711
and convTypeAux cenv emEnv preferCreated ty =
715712
match ty with
716-
| ILType.Void -> !! Type.GetType("System.Void")
713+
| ILType.Void -> !!Type.GetType("System.Void")
717714
| ILType.Array(shape, eltType) ->
718715
let baseT = convTypeAux cenv emEnv preferCreated eltType
719716
let nDims = shape.Rank
@@ -1491,7 +1488,7 @@ let rec emitInstr cenv (modB: ModuleBuilder) emEnv (ilG: ILGenerator) instr =
14911488
ilG.EmitAndLog(OpCodes.Ldelema, convType cenv emEnv ty)
14921489
else
14931490
let arrayTy = convType cenv emEnv (ILType.Array(shape, ty))
1494-
let elemTy = !! arrayTy.GetElementType()
1491+
let elemTy = !!arrayTy.GetElementType()
14951492
let argTys = Array.create shape.Rank typeof<int>
14961493
let retTy = elemTy.MakeByRefType()
14971494

@@ -1517,7 +1514,7 @@ let rec emitInstr cenv (modB: ModuleBuilder) emEnv (ilG: ILGenerator) instr =
15171514
ilG.EmitAndLog(OpCodes.Stelem, convType cenv emEnv ty)
15181515
else
15191516
let arrayTy = convType cenv emEnv (ILType.Array(shape, ty))
1520-
let elemTy = !! arrayTy.GetElementType()
1517+
let elemTy = !!arrayTy.GetElementType()
15211518

15221519
let meth =
15231520
modB.GetArrayMethodAndLog(
@@ -2497,7 +2494,7 @@ let mkDynamicAssemblyAndModule (assemblyName: string, optimize, collectible) =
24972494
let daType = typeof<System.Diagnostics.DebuggableAttribute>
24982495

24992496
let daCtor =
2500-
!! daType.GetConstructor([| typeof<System.Diagnostics.DebuggableAttribute.DebuggingModes> |])
2497+
!!daType.GetConstructor([| typeof<System.Diagnostics.DebuggableAttribute.DebuggingModes> |])
25012498

25022499
let daBuilder =
25032500
CustomAttributeBuilder(

src/Compiler/AbstractIL/ilsupp.fs

+2-4
Original file line numberDiff line numberDiff line change
@@ -653,8 +653,7 @@ let unlinkResource (ulLinkedResourceBaseRVA: int32) (pbLinkedResource: byte[]) =
653653
for i = 0 to (nResNodes - 1) do
654654
size <-
655655
size
656-
+ pResNodes[i]
657-
.Save(ulLinkedResourceBaseRVA, pbLinkedResource, Unchecked.defaultof<byte[]>, 0)
656+
+ pResNodes[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, Unchecked.defaultof<byte[]>, 0)
658657

659658
let pResBuffer = Bytes.zeroCreate size
660659

@@ -670,7 +669,6 @@ let unlinkResource (ulLinkedResourceBaseRVA: int32) (pbLinkedResource: byte[]) =
670669
for i = 0 to (nResNodes - 1) do
671670
resBufferOffset <-
672671
resBufferOffset
673-
+ pResNodes[i]
674-
.Save(ulLinkedResourceBaseRVA, pbLinkedResource, pResBuffer, resBufferOffset)
672+
+ pResNodes[i].Save(ulLinkedResourceBaseRVA, pbLinkedResource, pResBuffer, resBufferOffset)
675673

676674
pResBuffer

src/Compiler/Checking/Expressions/CheckComputationExpressions.fs

+1-3
Original file line numberDiff line numberDiff line change
@@ -3083,9 +3083,7 @@ let TcComputationExpression (cenv: TcFileState) env (overallTy: OverallTy) tpenv
30833083
TranslateComputationExpression ceenv CompExprTranslationPass.Initial hasCustomOperations (LazyWithContext.NotLazy([], env)) comp id
30843084

30853085
let mDelayOrQuoteOrRun =
3086-
mBuilderVal
3087-
.NoteSourceConstruct(NotedSourceConstruct.DelayOrQuoteOrRun)
3088-
.MakeSynthetic()
3086+
mBuilderVal.NoteSourceConstruct(NotedSourceConstruct.DelayOrQuoteOrRun).MakeSynthetic()
30893087

30903088
// Add a call to 'Delay' if the method is present
30913089
let delayedExpr =

src/Compiler/Checking/TailCallChecks.fs

+6-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,12 @@ let CheckModuleBinding cenv (isRec: bool) (TBind _ as bind) =
792792
// warn for recursive calls in TryWith/TryFinally operations
793793
exprs |> Seq.iter (checkTailCall true)
794794
| Expr.Op(args = exprs) -> exprs |> Seq.iter (checkTailCall insideSubBindingOrTry)
795-
| Expr.Sequential(expr2 = expr2) -> checkTailCall insideSubBindingOrTry expr2
795+
| Expr.Sequential(expr1 = expr1; expr2 = expr2) ->
796+
match expr1 with
797+
| Expr.Op(args = exprs; op = TOp.IntegerForLoop _) -> checkTailCall insideSubBindingOrTry expr1
798+
| _ -> ()
799+
800+
checkTailCall insideSubBindingOrTry expr2
796801
| _ -> ()
797802

798803
checkTailCall false bodyExpr

0 commit comments

Comments
 (0)