Skip to content

Reject runtime async Await in ordinary task state machines - #20584

Merged
abonie merged 2 commits into
mainfrom
fix/issue-20576
Sep 21, 2026
Merged

abonie merged 2 commits into
mainfrom
fix/issue-20576

Conversation

@T-Gro

@T-Gro T-Gro commented Sep 18, 2026

Copy link
Copy Markdown
Member

Fixes #20576

Report FS3918 for runtime-only Await calls inside ordinary task state-machine methods, while preserving normal task composition inside runtime-async methods.

Reset runtime-async and inline emission context at generated method boundaries, preserving the enclosing runtime-async body. Cover FS3918 diagnostics, imported inline templates, staged legal composition, and emitted method flags in both optimization modes.

Fixes #20576

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

✅ Release notes checked


✅ Found changes and release notes in following paths:

Change path Release notes path Description
`src/Compiler` docs/release-notes/.FSharp.Compiler.Service/11.0.100.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Sep 18, 2026
@T-Gro
T-Gro requested a review from abonie September 20, 2026 13:10
@github-project-automation github-project-automation Bot moved this from New to In Progress in F# Compiler and Tooling Sep 21, 2026
@abonie
abonie merged commit 91b37f2 into main Sep 21, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Reject runtime async Await in ordinary task state machines

2 participants