Conversation
Add a NestedLoops module to both TaskExtensions and AsyncExtensions test files covering: - Outer taskSeq (IAsyncEnumerable) + inner regular list - Outer taskSeq + inner regular array - Outer taskSeq + inner zipped array with tuple destructuring (reproducing the pattern from issue #269) - Outer taskSeq + inner taskSeq (nested async enumeration) - Three levels of nesting (task CE only) These tests document and guard the behaviour of nested iteration in both the task {} and async {} computation expressions when the outer sequence is an IAsyncEnumerable<T>. 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 PR was created by Repo Assist, an automated AI assistant.
Summary
Adds a
NestedLoopsmodule to bothTaskSeq.TaskExtensions.Tests.fsandTaskSeq.AsyncExtensions.Tests.fs, testing the behaviour of nestedforloops intask {}andasync {}computation expressions when the outer sequence is anIAsyncEnumerable(T).This is related to issue #269, which reports a
NullReferenceExceptionwhen nesting loops in Release mode. These tests cover the same code paths and serve as both regression guards and documentation of expected behaviour.New tests
task {}CE (TaskSeq.TaskExtensions.Tests.fs):Task-for CE with nested regular list inside taskSeq loopTask-for CE with nested array inside taskSeq loopTask-for CE with nested tuple-destructuring array inside taskSeq loop— mirrors issue Null reference exception when nesting loops in Release mode #269 patternTask-for CE with nested taskSeq inside taskSeq loopTask-for CE with three levels of nestingasync {}CE (TaskSeq.AsyncExtensions.Tests.fs):Async-for CE with nested regular list inside taskSeq loopAsync-for CE with nested array inside taskSeq loopAsync-for CE with nested tuple-destructuring array inside taskSeq loopAsync-for CE with nested taskSeq inside taskSeq loopTest Status
✅ Build: succeeded (
dotnet build -c Release)✅ Tests: 3534 passed, 2 skipped, 0 failed (
dotnet test -c Release)✅ Formatting: clean (
dotnet fantomas . --check)