-
Notifications
You must be signed in to change notification settings - Fork 797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support more types in for-loops #18301
base: main
Are you sure you want to change the base?
Support more types in for-loops #18301
Conversation
❗ Release notes required
|
Since this does affect the language, the new fallback branch should be guarded with a LanguageFeature flag. This will also need same extension of the https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/loops-for-to-expression section of the docs (the "docs diff" can also be used as an RFC). Will there be limitations for |
It can also be a branch producing a recoverable error like "F# 10/preview is required". It would allow having a single branch in the checking logic, while also fail the build, effectively disallowing the new behavior in the older language versions. |
Indeed, |
Agreed.
Agreed.
Yeah. As-is, |
What will the user experience when using (existing integral |
It will tell the user that the type does not support the unary minus operator That is probably not ideal, since the user wrote If we wanted to emit an error more like " |
Description
Examples
Checklist