Add a refactoring between option and struct partial active patterns - #20545
xperiandri wants to merge 3 commits into
Conversation
…patterns A single-case partial active pattern whose results are all Some/None (or all ValueSome/ValueNone) switches between the two: the result cases and the return type annotation are renamed, and [<return: Struct>] is added or removed. Match sites need no change. Local active patterns cannot carry attributes, so there the value option return alone makes them struct, which needs F# 9. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
|
|
I appreciate all these PRs, they're bringing F# (VS) tooling closer to what C#'s had for ages, but I feel like you're just creating an ever-increasing mountain of work to review. I get anxious with every new PR notification, and it's not even my job to review them. Maybe take a break for a couple of weeks, making sure the existing PRs get over the line, and see where things stand afterwards? |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e of its section Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
🔍 Tooling Safety Check — Affects-Design-Time
|
T-Gro
left a comment
There was a problem hiding this comment.
🤖🕵️ Please shorten the description using this guidance. Focus on the problem and why the change is needed, in simplified technical English. Leave the implementation inventory to the Files tab and retain necessary caveats.
Covered casesConverts
Not offered
|
Match sites don't change, so only the definition is edited. A local active pattern can't carry the attribute, so it converts to struct only on F# 9 or later. Not offered when a result isn't built from
Some/None(orValueSome/ValueNone), or when the file has a paired.fsi.🤖 Generated with Claude Code