[Repo Assist] Fix FS3873: replace deprecated bare range expressions in tests#283
Closed
github-actions[bot] wants to merge 3 commits intomainfrom
Closed
Conversation
…erals
Bare range expressions like `{ 1..10 }` used as constructor arguments are
deprecated in newer F# compilers (error FS3873). Replace with list literals
`[1..10]` in two places in TaskSeq.Concat.Tests.fs.
This fixes a build failure with .NET SDK 10.x / F# 9.x and later.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This is an automated PR from Repo Assist.
Summary
Two uses of bare range expressions (
{ 1..10 }) inTaskSeq.Concat.Tests.fstrigger error FS3873 ("This construct is deprecated. Sequence expressions should be of the formseq { ... }") with F# 9.x / .NET SDK 10.x and later. SinceTreatWarningsAsErrorsis set toTruein the test project, this causes an outright build failure on newer toolchains.Root cause
{ 1..10 }was a shorthand for sequence expressions, deprecated in F# 9. The compiler now requires explicitseq { ... }syntax for sequence expressions — or, more idiomatically here, a list literal.Fix
Replace with list literals, which are the simplest and clearest form for a finite integer range:
Test Status
dotnet build src/FSharp.Control.TaskSeq.sln -c Release— succeeded (0 warnings, 0 errors)net6.0and no .NET 6 runtime is present in this environment. The CI pipeline onwindows-latesthas .NET 6 available and is the canonical test environment.Files changed
src/FSharp.Control.TaskSeq.Test/TaskSeq.Concat.Tests.fs— 2 lines changed