Skip to content

Add regression test: #3783, Mutually recursive computation expression NullReferenceException#19613

Merged
abonie merged 1 commit intomainfrom
regression-test/issue3783-056569d5ee4073c5
Apr 20, 2026
Merged

Add regression test: #3783, Mutually recursive computation expression NullReferenceException#19613
abonie merged 1 commit intomainfrom
regression-test/issue3783-056569d5ee4073c5

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Fixes #3783

Summary

Adds a regression test for issue #3783 which reported a NullReferenceException when using mutually recursive let rec ... and bindings with sequence computation expressions.

The issue originally manifested in both:

  1. Function-scoped let rec a = seq { ... } and b () = seq { ... } bindings
  2. Type constructor-scoped (same pattern inside a class constructor)

Both variants now compile and run correctly, producing the expected alternating [0; 1; 0; 1; ...] sequence.

Test

The test compiles and executes both variants, asserting the output matches [0; 1; 0; 1; 0; 1; 0; 1; 0; 1].

dotnet test --project tests/FSharp.Compiler.ComponentTests -c Release -- --filter-method "*Issue 3783*"

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

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

…ion NullReferenceException

Test both function-scoped and type-constructor-scoped variants of mutually
recursive sequence expressions to verify the NullReferenceException no longer
occurs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added AI-Issue-Regression-PR PR adding regression test for a closed issue NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes labels Apr 19, 2026
@github-actions github-actions Bot requested a review from a team as a code owner April 19, 2026 13:11
@github-actions github-actions Bot added the AI-Issue-Regression-PR PR adding regression test for a closed issue label Apr 19, 2026
@github-actions github-actions Bot requested review from T-Gro and abonie April 19, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Issue-Regression-PR PR adding regression test for a closed issue NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Mutually recursive computation expression raises NullReferenceException under some conditions

1 participant