Skip to content

[Repo Assist] Fix FS3873: replace deprecated bare range expressions in tests#283

Closed
github-actions[bot] wants to merge 3 commits intomainfrom
repo-assist/fix-deprecated-seq-expr-2026-03-0eb1b56b474fc6bf
Closed

[Repo Assist] Fix FS3873: replace deprecated bare range expressions in tests#283
github-actions[bot] wants to merge 3 commits intomainfrom
repo-assist/fix-deprecated-seq-expr-2026-03-0eb1b56b474fc6bf

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Mar 7, 2026

🤖 This is an automated PR from Repo Assist.

Summary

Two uses of bare range expressions ({ 1..10 }) in TaskSeq.Concat.Tests.fs trigger error FS3873 ("This construct is deprecated. Sequence expressions should be of the form seq { ... }") with F# 9.x / .NET SDK 10.x and later. Since TreatWarningsAsErrors is set to True in the test project, this causes an outright build failure on newer toolchains.

Root cause

// Before (fails on newer F# compilers):
yield ResizeArray { 1..10 }

{ 1..10 } was a shorthand for sequence expressions, deprecated in F# 9. The compiler now requires explicit seq { ... } 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:

// After:
yield ResizeArray [1..10]

Test Status

  • Build: dotnet build src/FSharp.Control.TaskSeq.sln -c Releasesucceeded (0 warnings, 0 errors)
  • ⚠️ Tests: Cannot run locally — the test project targets net6.0 and no .NET 6 runtime is present in this environment. The CI pipeline on windows-latest has .NET 6 available and is the canonical test environment.

Files changed

  • src/FSharp.Control.TaskSeq.Test/TaskSeq.Concat.Tests.fs — 2 lines changed

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@ec7d342403c9912c87320110f8822a8fbb817a0c

…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>
@dsyme dsyme closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant